/USDriverLicenseScanner

USDriverLicenseScanner is a library for scanning US driver license details from your iPhone camera.

Primary LanguageSwiftMIT LicenseMIT

USDriverLicenseScanner

Swift Carthage compatible

USDriverLicenseScanner is a library for scanning US driver license details from your iPhone camera.

USDriverLicenseScanner

How to use

  • Make your UIViewController conformed to ScanDriverLicenseViewControllerDelegate
  • Implement func didScanResult(driverInfo: DriverLicense) (it will be callbacked with driver license info, once scanned)
  • Show scanner view
/// create
let scanner = ScanDriverLicenseViewController(
	title: "Scan Driver License", 
	focusDesc: "Align with the barcode on the back of your license.", 
	detailDesc: "By adding my license, I consent to a standard driver record check, powered by Checkr")
/// delegate
scanner.delegate = self
/// add cancel button
let navigation = UINavigationController(rootViewController: scanner)
scanner.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Cancel", style: .done, target: self, action: #selector(dismissSelf))
/// show
self.present(navigation, animated: true, completion: nil)

Or check out the example app.

Carthage

github "tonyli508/USDriverLicenseScanner" ~> 1.0.0

Check out the example code in Carthage branch as well, if you need more details.