PapilonMRZScanneriOS

A Swift package for scanning MRZ of the documents.
This package uses Apple’s Vision API.

Requirements

  • iOS 13.0+

Installation

PapilonMRZScanneriOS is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'PapilonMRZScanneriOS'

Note: In order to scan MRZ, you need to use camera AVFoundation. Do not forget to get camera permissions. Do not forget to add permissions with usage descriptions to your app Info.plist;

Click on YourApp -> TARGETS -> Info -> Press ‘+’ -> Add Privacy - Camera Usage Description

Note: swift-tools-version: should be at least 5.1

Dependencies

This package has a dependency for parsing scanned MRZ text; MRZParser.

Usage

There are two functions for the scanning process:

LiveMRZScanner:

It can be used as follows;

let scanner = LiveMRZScanner()

This is used for real-time scanning.

ImageMRZScanner:

It can be used as follows;

let scanner = ImageMRZScanner()

This is used scanning text from one single image.

scanFrame, scan methods should be called to scan.

License

See the LICENSE file for more info.

GitHub

View Github