Skip to content

VDNfcScannerController

Entry class of the SDK.

Launches a controller with a small tutorial that consists in a gif simulating the process and some informative text. Pressing in the button, starts the NFC scanning.

The developer should only initialize the controller inside the VDNfcScanner framework. The framework closes itself once the process is completed. A working example for a document:

    let documentType = NfcDocumentType.getDocumentType(type: "ES_IDCard_2015") // For example.
    let nfcController = VDNfcScannerController(self, documentType: documentType!)
    nfcController.configuration = getConfiguration() // This method should be implemented by the developer.
    nfcController.keys = getNfcKeys() // This method should be implemented by the developer. Can be retrieved from server.
    nfcController.dictionaryKeys = getDictionaryKeys() // This method should be implemented by the developer. Can be retrieved from server.
    present(nfcController, animated: true, completion: nil)

Properties

public var delegate: VDNfcScannerControllerDelegate!

Delegate that will handle the protocol calls.

public var configuration: NfcConfiguration!

Configuration of the SDK.

public var documentType: NfcDocumentType!

Document type used for reading.

public var maxRetries: UInt!

Maximum number of times that a user can retry NFC reading if an error occurs.

An error introducing the NFC keys does not count as an error and does no add a retry

public var keys: NfcKeys!

NFC keys of the document to be read.

public var dictionaryKeys: [String]?

Default keys that are returned by the SDK once the NFC data is read.

Public Methods

public init(_ delegate: VDNfcScannerControllerDelegate, documentType: NfcDocumentType)

Constructor of the class.

Creates the view controller that shows a tutorial and performs the nfc reading.

public static func getVersion() -> String

Gets the version of the SDK.

  • Returns:

    • Version of the SDK.