NFC
This section contains the necessary knowledge to understand the start nfc in BiometridStandard.
It contains two methods to start NFC:
Manual NFC, where you send the MRZ data for the nfc scan
Auto NFC, where it has a step to take a photo of mrz code, and then starts nfc scan.
//Manual
BiometridStandard.getInstance().startNFC(viewController: self, mrz: mrzCode, nfcCustomization: nfcCustomization, callback: self)
//Auto
BiometridStandard.getInstance().startNFC(viewController: self, nfcCustomization: nfcCustomization, callback: self)
Parameter
Description
viewController: UIViewController
View Controller to open the NFC screen
mrz: MRZKey
Data with MRZ of passport or ID Card which you want to scan
options: NFCCustomization?
Options to change customization of nfc screen
callback: ProcessCallback?
callback
Implementation example
import UIKit
import BiometridStandardSDK
class ViewController: UIViewController, ProcessCallback {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func startManualNFCBtn(_ sender: Any) {
let customization = NFCCustomization()
BiometridStandard.getInstance().startNFC(viewController: self, mrz: passportMRZ, nfcCustomization: customization, callback: self)
}
@IBAction func startAutoNFCBtn(_ sender: Any) {
let customization = NFCCustomization()
BiometridStandard.getInstance().startNFC(viewController: self, nfcCustomization: customization, callback: self)
}
func nfcCallback(document: NFCData?, error: Errors?) {
if error != nil {
print(error?.rawValue)
return
}
print("document", document)
}
}
Callback params
document: NFCData?
Object containing all the extracted data from the scanned document
errors: Errors?
Errors associated enum
Was this helpful?