NFC Component
0. SDK Mobile Base Requirementsβ
SDK Mobile is a set of libraries (Components) that offer a series of functionalities and services, allowing their integration into a Mobile application in a simple and fully scalable way. Certain components must be installed depending on the use case required. Its high level of modularity allows other new components to be added in the future without affecting those already integrated into the project.
For more information on the base configuration, go to the Getting Started section.
1. Introductionβ
The Component discussed in the current document is called NFC Component. It is responsible for NFC reading of ID cards and passports. Its main functionalities are the following:
-
Internal management of the NFC sensor.
-
Permission management.
-
Document analysis.
-
Progress analysis.
-
Assistant in reading processes.
-
Return all possible information to be read
-
Return of images when they are available for reading.
1.1 Minimum requirementsβ
The minimum iOS SDK version required is as follows:
-
Minimum iOS version: 13
-
Minimum device: iPhone 6s - the first to have an NFC reader
2. Integration of the componentβ
β οΈ Before integrating this component, it is recommended to read the documentation related to Initial Integration and follow the instructions given in that document.
This section will explain step by step how to integrate the current component into an existing project.
2.1. Dependencies required for integrationβ
To avoid conflicts and compatibility problems, if you want to install the component in a project containing an old Facephi libraries (Widgets) version, these must be removed entirely before installing the SDKMobile components.
- Currently FacePhi libraries are distributed remotely through different dependency managers, in this case Cocoapods. The mandatory dependencies that must have been previously installed (adding them to the project's Podfile file) are:
Cocoapodsβ
The mandatory dependencies that must have been previously installed (adding them to the project's Podfile file) are:
pod 'FPHISDKMainComponent', '~> 2.4.0'
To install the NFC component, the following entry must be included in the application's Podfile:
pod 'FPHISDKNFCComponent', '~> 2.11.0'
SPMβ
The mandatory dependencies that must have been previously installed are:
//HTTPS
https://github.com/facephi-clienters/SDK-SdkPackage-SPM.git
//SSH
git@github.com:facephi-clienters/SDK-SdkPackage-SPM.git
To install the NFC component, it must be included in the project modules:
//HTTPS
https://github.com/facephi-clienters/SDK-NFC_component-SPM.git
//SSH
git@github.com:facephi-clienters/SDK-NFC_component-SPM.git
Once the dependencies are installed, you can use the different functionalities of the component.
- If developing with XCode15, a post-installation script must be included:

2.2 Permissions and settingsβ
In the client application where the components are going to be integrated, it is necessary to incorporate the following elements in the Info.plist file:
It is necessary to allow the use of NFC - (Privacy - NFC Scan Usage Description)
Indicate NFC identifiers - (ISO7816 application identifiers for NFC Tag Reader Session)
A0000002471001
A0000002472001
00000000000000
It is necessary to add the Near Field Communication Tag Reading option in the Signing & Capabilities section of the target
3. Start a new operationβ
In order to generate the associated information correctly in the platform, the newOperation command must be executed first.
βΉοΈ This command must have been executed before launch.
To learn more about how to start a new operation, it is recommended to consult the Start a new operation documentation, which details and explains what this process consists of.
4. Available driversβ
| Controller | Description |
|---|---|
| NFCController | NFC reading main controller |
5. Component configurationβ
Once initialized, a NFCConfigurationData object must be created and passed as a parameter to the SDKController during component launch to configure the current component.
The following section will show the fields part of this class and what each is used for.
5.1. Class NFCConfigurationDataβ
5.1.1. Basic Documentationβ
showTutorialβ
Indicates if the component activates the tutorial screen. This view explains intuitively how the capture is performed.
vibrationEnabledβ
iOS does not allow vibration to be added while taking NFC readings.
showDiagnosticβ
If set to true, if an error or lack of permissions occurs, the sdk will display a screen with the error returned by the widget.
extractionTimeoutβ
Sets the maximum time the readout can be performed.
5.1.2. Advanced Documentationβ
enableDebugModeβ
Enable debug mode for the component.
skipPaceβ
Indicates that only NFC BAC reading is desired. This is a simpler and faster simpler and faster information that allows reading of a wider variety of documents. variety of documents.
5.1.3 Other parametersβ
documentNumberβ
Indicates the document number or media number depending on the document to be read. document to be read.
This field is mandatory.
birthDateβ
Indicates the date of birth appearing in the document ("dd/MM/yyyy").
This field is mandatory.
expirationDateβ
Indicates the expiry date as it appears in the document ("dd/MM/yyyy").
This field is mandatory.
issuerβ
Indicates the country of origin of the document to be read.
documentTypeβ
Indicates the type of document to be read: - ID_CARD - PASSPORT - FOREIGN_CARD