PLATFORMS << NATIVE MOBILE
MRZ Scanner for iOS
A Swift package with the camera screen, AR mode and photo scanning.
- PackageMRZScannerAR (Swift package)
- RequiresiOS 15 and later
- Version2.5.0
Passport & ID
P<UTOERIKSSON<<ANNA<MARIA<<<<<
L898902C36UTO7408122F12041
L898902C36UTO7408122F12041
ERIKSSON, ANNA MARIAL898902C3 · UTO · check digits valid
How it starts
- 1Add the Swift package MRZScannerAR (from Downloads in the portal) to your Xcode project.
- 2Add a camera usage text (NSCameraUsageDescription) to Info.plist.
- 3Call MRZScan.registerLicense once when the app starts.
- 4Open the camera screen with MRZScan.present, or read a photo with MRZScan.scanImage.
Install
The Swift package (MRZScannerAR with MRZScannerCore.xcframework) is under Downloads in the portal. Add it to your Xcode project as a Swift package.
Scan a document
iOSswift
import MRZScannerAR
_ = MRZScan.registerLicense("MRZ2...") // once, at start
MRZScan.present(from: self, settings: #"{"documentTypes":["passport","id"]}"#) { resultJSON in
// {"status":"read","reads":[{"text":"P<UTO...","fields":{...},"checkDigitsValid":true}]}
print(resultJSON)
}