NFC capture
This component requires a minimum iOS13 version
Introduction
The Component discussed in the current document is called NFC Component. It is responsible for reading NFC from identity documents and passports. Its main functionalities are as follows:
Internal management of the NFC sensor.
Permission management.
Document analysis.
Progress analysis.
Assistant in the reading processes.
Return of all possible information to be read
Return of images when they are available for reading
Dependencies
To avoid conflicts and compatibility issues, if you want to install the component in a project that contains an old version of the Facephi libraries (Widgets), they must be completely removed before installing the components of the SDKMobile.
CocoaPods
The required dependencies that must have been installed previously (by adding them to the project's Podfile file) are:
pod 'FPHISDKMainComponent', '~> $SDK_VERSION'To install the NFC component, the following entry must be included in the application's Podfile:
SPM
The required dependencies that must have been installed previously are:
To install the NFC component, it must be included in the project's modules:
Available controllers
Controller
Description
FNFCController
Main NFC reading controller
Error handling
In the error part, internally we have the class NFCPassportReaderError. This enum contains many specific errors that do not provide useful information if they are returned to the integrator, so they are transformed into a simpler type (ErrorType):
NFC_CANCEL_BY_USER: The user has canceled the process.
NFC_COMPONENT_LICENSE_ERROR: The component license is not valid.
NFC_EMPTY_LICENSE: The license String is empty.
NFC_EXTRACT_DATA_ERROR: Error in the extracted data.
NFC_INITIALIZATION_ERROR: Initialization error.
NFC_LAST_COMMAND_EXPECTED: Error in the termination command
NFC_ERROR: General error
NFC_ERROR_DATA: Error in the input data
NFC_ERROR_DISABLED: NFC disabled
NFC_ERROR_ILLEGAL_ARGUMENT: NFC with an incorrect tag
NFC_ERROR_IO: Input/output error
NFC_ERROR_NOT_SUPPORTED: NFC not supported
NFC_ERROR_TAG_LOST: Connection lost
NFC_OPERATION_NOT_CREATED: There is no operation in progress.
NFC_TIMEOUT: Timeout in the process.
NOTE: NFC_INVALID_MRZ_KEY means that the connection could not be established because the configuration input data (documentNumber, birthDate, expiryDate) are not correct. All read attempts for that NFC will fail until a new NFCController is initialized with the correct data.
Last updated