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

How it starts

  1. 1Add the Swift package MRZScannerAR (from Downloads in the portal) to your Xcode project.
  2. 2Add a camera usage text (NSCameraUsageDescription) to Info.plist.
  3. 3Call MRZScan.registerLicense once when the app starts.
  4. 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)
}

Also available for