- Notifications
You must be signed in to change notification settings - Fork81
Scan MRZ (Machine Readable Zone) from identity documents (passport, id, visa) using iPhone/iPad (iOS)
License
Mattijah/QKMRZScanner
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Scans MRZ (Machine Readable Zone) from identity documents.
For better M1 & SPM support please seemaster-spm.
QKMRZScanner is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod'QKMRZScanner'
Please note:Xcode 12 andCocoaPods >= 1.10.0.rc.1 is recommended. More infohere.
AssignQKMRZScannerView
to the component responsible for displaying the camera view.
Subsequently connect this component to your UIViewController.
@IBOutlet weakvarmrzScannerView:QKMRZScannerView!
overridefunc viewWillAppear(_ animated:Bool){ super.viewWillAppear(animated) mrzScannerView.startScanning()}
overridefunc viewWillDisappear(_ animated:Bool){ super.viewWillDisappear(animated) mrzScannerView.stopScanning()}
In order to retrieve the scanning results you need to implementQKMRZScannerViewDelegate
.
classMRZScannerViewController:UIViewController,QKMRZScannerViewDelegate{@IBOutlet weakvarmrzScannerView:QKMRZScannerView!overridefunc viewDidLoad(){ super.viewDidLoad() mrzScannerView.delegate=self}func mrzScannerView(_ mrzScannerView:QKMRZScannerView, didFind scanResult:QKMRZScanResult){print(scanResult)}}
This project is licensed under the MIT License - see theLICENSE file for details
About
Scan MRZ (Machine Readable Zone) from identity documents (passport, id, visa) using iPhone/iPad (iOS)