Latest 1.1.2
Homepage https://github.com/Mattijah/QKMRZScanner
License MIT
Platforms ios 10
Dependencies EVGPUImage2, QKMRZParser, SwiftyTesseract
Frameworks Foundation, UIKit, AVFoundation, CoreImage, AudioToolbox
Authors

Swift 4.2
Git

Scans MRZ (Machine Readable Zone) from identity documents.

scanning_preview

Installation

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

pod 'QKMRZScanner'

Setup

Assign QKMRZScannerView to the component responsible for displaying the camera view.

storyboard_setup

Subsequently connect this component to your UIViewController.

@IBOutlet weak var mrzScannerView: QKMRZScannerView!

Start scanning

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    mrzScannerView.startScanning()
}

Stop scanning

override func viewWillDisappear(_ animated: Bool) {
    super.viewWillDisappear(animated)
    mrzScannerView.stopScanning()
}

Scanning Result

In order to retrieve the scanning results you need to implement QKMRZScannerViewDelegate.

class MRZScannerViewController: UIViewController, QKMRZScannerViewDelegate {
    @IBOutlet weak var mrzScannerView: QKMRZScannerView!

    override func viewDidLoad() {
        super.viewDidLoad()
        mrzScannerView.delegate = self
    }

    func mrzScannerView(_ mrzScannerView: QKMRZScannerView, didFind scanResult: QKMRZScanResult) {
        print(scanResult)
    }
}

License

This project is licensed under the MIT License – see the LICENSE file for details

Latest podspec

{
    "name": "QKMRZScanner",
    "version": "1.1.2",
    "platforms": {
        "ios": "10"
    },
    "swift_version": "4.2",
    "summary": "Scans MRZ (Machine Readable Zone) from identity documents.",
    "authors": {
        "Matej Dorcak": "[email protected]"
    },
    "homepage": "https://github.com/Mattijah/QKMRZScanner",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "source": {
        "git": "https://github.com/Mattijah/QKMRZScanner.git",
        "tag": "v1.1.2"
    },
    "source_files": "QKMRZScanner/**/*.{swift}",
    "resources": "QKMRZScanner/Supporting Files/tessdata",
    "frameworks": [
        "Foundation",
        "UIKit",
        "AVFoundation",
        "CoreImage",
        "AudioToolbox"
    ],
    "dependencies": {
        "EVGPUImage2": [],
        "QKMRZParser": [],
        "SwiftyTesseract": []
    }
}

Pin It on Pinterest

Share This