Nfc Scanner

Defined in framework ScanditIdCapture

NfcScannerListener
protocol NfcScannerListener : NSObjectProtocol

Added in version 8.5.0

Listener for NFC scanning events.

nfcScanner
open func nfcScanner(_ scanner: NfcScanner, didCapture capturedId: CapturedId) -> Void

Added in version 8.5.0

Called when NFC scanning completes successfully and the captured ID has been enriched with NFC data.

nfcScanner
optional func nfcScanner(_ scanner: NfcScanner, didFailWithError error: any Error) -> Void

Added in version 8.5.0

Called when NFC scanning fails due to an error.

nfcScannerDidSkip
optional func nfcScannerDidSkip(_ scanner: NfcScanner) -> Void

Added in version 8.5.0

Called when NFC scanning is skipped (e.g. the document type is unsupported, or the device does not support NFC).

NfcScanner
open class NfcScanner : NSObject

Added in version 8.5.0

A class that provides functionality to read NFC chips embedded in identity documents. It supports reading from various types of documents including passports, ID cards, and visas.

scanner
open class func scanner(viewController: UIViewController) -> Self?

Added in version 8.5.0

Creates a new NFC scanner instance. Returns nil if NFC scanning is not available on this device or the required framework is not present.

listener
open weak var listener: NfcScannerListener? { get, set }

Added in version 8.5.0

The listener that receives NFC scanning events. Set this before calling scanNfc().

scanNfc
open func scanNfc(with capturedId: CapturedId, idCapture: IdCapture) -> Void

Added in version 8.5.0

Starts NFC scanning for the given captured ID. The captured ID must contain valid MRZ data, which is used as the access key for the NFC chip. The listener will be notified when scanning completes, fails, or is skipped.