iOS QR Code Scanner
The sample demonstrates how to quickly implement an iOS QR code scanner app using SwiftUI, Dynamsoft Camera Enhancer and Dynamsoft Barcode Reader.
Pre-requisites
-
Xcode 13.2.1
-
Dynamsoft Camera Enhancer 2.1.1
-
Dynamsoft Barcode Reader 8.9.1
A valid license key is required for the barcode SDK. Click here to apply for a 30-day FREE Trial license.
Usage
-
Install Dynamsoft Camera Enhancer and Dynamsoft Barcode Reader. Then open the project in Xcode:
brew install cocoapods pod install open qrscanner.xcworkspace
-
Open
Signing & Capabilities
editor to select a team. -
There is no
Info.plist
file in Xcode 13.2.1. You need to add the camera permission key toTARGETS > Info
:Privacy - Camera Usage Description
-
Set the license key in
CameraManager.swift
:barcodeReader = DynamsoftBarcodeReader.init(license: "LICENSE-KEY")
-
Connect an iPhone or iPad to run the app.
ios-swiftui-camera-qr-code-scanner.mp4