The QR Codes are two-dimensional barcodes designed by the automotive industry in 1994, but now widely used in many fields such as banking, industrial, commercial or social.

In the projects you are working on, this technology may need to be integrated, so let’s see how to build a QR code reader with the AVFoundation library in Swift .


We go to work

After creating a new project in Xcode the first thing to do is go to **info.plist,**to set the camera permissions.

Now you have to add a new key, scrolling down to Privacy - Camera use description and then you have to set a relative string

Like in this screen:

Image for post

I wrote Used to scan the QR Code, but you can write other.

Well, now for have a good look create a viewfinder in .png format, to include in the project.

As you can see, to make the demo more beautiful, I’ve also included a navigation controller.

Image for post

To get the viewfinder you can use any graphics application such as Photoshop or Affinity Photo or you can search for it on the web.

#ios #swift #qr-code #ios-app-development #programming

Build Your QR Code Reader
1.95 GEEK