Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yushulx/ios-swiftui-camera-qr-code-scanner
iOS barcdoe QR code scanner built with Dynamsoft Barcode Reader
https://github.com/yushulx/ios-swiftui-camera-qr-code-scanner
barcode datamatrix ios pdf417 qrcode swift swiftui
Last synced: about 2 months ago
JSON representation
iOS barcdoe QR code scanner built with Dynamsoft Barcode Reader
- Host: GitHub
- URL: https://github.com/yushulx/ios-swiftui-camera-qr-code-scanner
- Owner: yushulx
- Created: 2022-03-02T09:12:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-25T06:43:58.000Z (3 months ago)
- Last Synced: 2024-10-09T08:08:36.945Z (3 months ago)
- Topics: barcode, datamatrix, ios, pdf417, qrcode, swift, swiftui
- Language: Swift
- Homepage: https://www.dynamsoft.com/codepool/ios-qr-code-scanner-swiftui-m1-mac.html
- Size: 22.3 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iOS Barcode QR Code Scanner in SwiftUI
The sample demonstrates how to quickly implement an iOS Barcode QR code scanner app using [SwiftUI](https://developer.apple.com/xcode/swiftui/), [Dynamsoft Camera Enhancer](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/ios/guide/guide.html) and [Dynamsoft Barcode Reader](https://www.dynamsoft.com/barcode-reader/docs/mobile/programming/objectivec-swift/user-guide.html?lang=swift).## SDKs
- DynamsoftCameraEnhancer 4.0.2
- Dynamsoft Barcode Reader 10.0.21
A valid license key is required for the barcode SDK. Click [here](https://www.dynamsoft.com/customer/license/trialLicense/?product=dcv&package=cross-platform) to apply for a 30-day FREE Trial license.## Usage
1. Install the dependencies and then open the project in Xcode:```bash
brew install cocoapods
pod install
open qrscanner.xcworkspace
```
2. Set the license key in `AppDelegate.swift`:
```swift
import UIKit
import DynamsoftLicenseclass AppDelegate: UIResponder, UIApplicationDelegate, LicenseVerificationListener {
func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
if !isSuccess {
if let error = error {
print("\(error.localizedDescription)")
}
}
}func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Request a trial license: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr
LicenseManager.initLicense("LICENSE-KEY", verificationDelegate: self)
return true
}
}```
3. Connect an iPhone or iPad to run the app.
https://user-images.githubusercontent.com/2202306/156506394-7fccfdd2-5be6-4533-883c-b694034a2afa.mp4
## Blog
[Building iOS QR Code Scanner with SwiftUI on M1 Mac](https://www.dynamsoft.com/codepool/ios-qr-code-scanner-swiftui-m1-mac.html)