iOS NFC Native Interface

DocumentProcessor

Class Name

Description

DocumentProcessor

The DocumentProcessor class is a processor used to OCR MRZ data from document images and perform NFC reading of passports.

Instance Methods

Method Name

Description

func cancel(withMessage: String?)

Cancels any ongoing MRZ OCR or NFC scanning operations.

func isNfcSupported() -> Bool

Determines whether NFC scanning is supported with the current device and operating system configuration.

func performMrzOcr(image: String, onCompletion: (_ isValid: Bool, _ mrz: String?) -> Void)

Performs MRZ OCR on the provided image.

func performNfcScan(documentNumber: String, dateOfBirth: String, dateOfExpiry: String, challenge: [UInt8]?, onCompletion: (Error?, DaonDocumentProcessorResult?) -> Void)

Performs NFC scanning using the provided bac access control parameters.

func performNfcScan(mrzString: String, challenge: [UInt8]?, onCompletion: (Error?, DaonDocumentProcessorResult?) -> Void)

Performs NFC scanning using the provided mrz string.

Relationships

Inherits From

  • ObjectiveC.NSObject

Conforms To

  • DaonTrustSDK.DaonDocumentProcessorModule

  • ObjectiveC.NSObjectProtocol

  • Swift.CVarArg

  • Swift.Copyable

  • Swift.CustomDebugStringConvertible

  • Swift.CustomStringConvertible

  • Swift.Equatable

  • Swift.Hashable

DocumentProcessor.Builder

Class Name

Description

DocumentProcessor.Builder

The Builder class allows you to construct an instance of DocumentProcessor with specific settings.

Instance Methods

Method Name

Description

func build() throws -> DocumentProcessor

Builds the final DocumentProcessor instance which you can use to scan your document.

func setErrorDialogMessage(String) -> Builder

If a custom or default error message is desired, it can be set using this method. Otherwise, if left unset, the SDK will return an error message obtained from the error.localizedDescription property.

func setLicense(String) -> Builder

Used to set the license string that is mandatory in order for Trust SDK features to work.

Relationships

Inherits From

  • ObjectiveC.NSObject

Conforms To

  • ObjectiveC.NSObjectProtocol

  • Swift.CVarArg

  • Swift.CustomDebugStringConvertible

  • Swift.CustomStringConvertible

  • Swift.Equatable

  • Swift.Hashable