Demo and Samples
MRZ Scanner Demo
Samples
Four samples scan the MRZ on a passport or ID card using the ready-to-use MRZScannerViewController. They come in two pairs — a minimal one and a complete one — each available in UIKit and SwiftUI.
Unlike the Android samples, each iOS sample is a self-contained Xcode project: open the one you want directly rather than a shared workspace. Each declares its own bundle identifier, so all four can be installed on one device and compared side by side.
ScanMRZBasic
The smallest thing that scans an MRZ and shows the result: one screen that presents the scanner, handles all three result statuses, and renders the parsed fields and the portrait below the button. This is the app the MRZ Scanner User Guide builds step by step.
ScanMRZBasic has no storyboard and no navigation controller — it presents the scanner modally and dismisses it when the result arrives. ScanMRZBasicSwiftUI does the same through a .fullScreenCover.
ScanMRZ
A complete app built on the same SDK calls, adding a dedicated result screen, a processed/original switcher for the document images from both sides, per-field validation explanations, and camera-permission recovery. The ScanMRZ Demo App goes through it section by section.
Within each pair the SwiftUI version is a port of the UIKit one with the same screens, result layout, and scanner flow, so pick whichever UI framework matches your project.
All four samples target iOS 16, matching the SDK’s own minimum.
Both SwiftUI samples wrap MRZScannerViewController in a UIViewControllerRepresentable called MRZScannerView. That bridge is the pattern to copy when adding the scanner to a SwiftUI app of your own — Using the Scanner from SwiftUI walks through it.
A physical device is required to run any of the samples. The iOS Simulator does not expose a camera.
Next Steps
- MRZ Scanner User Guide — build
ScanMRZBasicfrom an empty project. - ScanMRZ Demo App — how the complete sample builds its result screen.
- Customizing the MRZ Scanner — document type, UI elements, feedback, and camera permission.
- iOS API Reference — all classes and methods.