Phingers Component
0. SDK Mobile base requirementsβ
SDK Mobile is a set of libraries (Components) that provides a set of functionalities and services a series of functionalities and services, allowing its integration in a Mobile application in a integration into a Mobile application in a simple and fully scalable way. scalable. Depending on the use case that is required, certain components must be installed. Depending on the required use case, certain components must be installed. Its high level of of modularity means that other new components can be added in the future new components can be added in the future without affecting those already integrated in the project. 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 Phingers Component. It is in charge of capturing the user's fingerprints and the subsequent extraction of the subsequent fingerprint templates. Its main functionalities are as follows:
-
Two modes of operation: extraction of the four fingers of the hand (except for the thumb), or (except the thumb), or extraction of the thumb only.
-
Internal camera management.
-
Permission management.
-
Built-in vividness detection.
-
Assistant in fingerprint capture processes.
-
Generation of templates with fingerprint characteristics, images and scores.
1.1 Minimum requirementsβ
The minimum iOS SDK version required is as follows:
- Minimum iOS version: 13
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:
The mandatory dependencies that must have been previously installed (adding them to the project's Podfile file) are:
pod 'FPHISDKMainComponent', '~> 1.4.0'.
-
To install the current component, the following entry must be included in the Podfile of the project entry in the Podfile of the application:
pod 'FPHISDKPhingersComponent', '~> 1.4.0'.
-
Once the dependencies have been installed, you will be able to use the different different functionalities of the component.
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 file info.plist. the following elements need to be incorporated in the info.plist file
It is necessary to allow the use of the camera (Privacy - Camera Usage Description)
3. Start 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 controllersβ
Controller | Description |
PhingersController | Main fingerprint capture controller |
5. Component configurationβ
To configure the current component, once it has been initialised, you need to create a PhingersConfigurationData object and pass it as a parameter to the SDKController during the component launch.
The following section will show the fields that are part of this class and what each one is used for. class and what each of them is used for.
5.1 Class PhingersConfigurationDataβ
5.1.1 reticleOrientationβ
Sets the fingerprint detection mode and indicates which fingers are to be detected during the process. The allowed values are:
-
LEFT: Enables the capture of the four fingers of the left hand.
-
RIGHT: Enables the capture of the four fingers of the left hand.
-
THUMB: The capture of a thumb is activated.
5.1.2 extractionTimeoutβ
Sets a stabilisation mode prior to any authentication process in the widget. authentication process in the widget. This mode forces the widget to not start any process if the user is not facing forward and not moving his head. head facing forward and not moving it.
5.1.3 returnRawImageβ
If set to true it shall return in the result the images in the same form as they have been captured. the same form in which they have been captured.
5.1.4 returnProcessedImageβ
If set to true it shall return the images in the result as they were captured. the same form in which they have been captured.
5.1.5 returnFingerprintTemplateβ
Specifies whether the capture process shall return the fingerprint template in the result. the result. It is an enumerated of type FingerprintTemplateType, and each value would be:
-
ISO: This template type refers to the standard ISO/IEC 19794-4.
-
INNOVATRICS: This type of template is a proprietary template template, compatible with scaling change, and very useful for different validation processes. validation processes.
-
NONE: Template return is disabled.
5.1.6 returnFullFrameImageβ
Specifies whether to return the full image of the camera where the fingers have been detected. fingers have been detected.
5.1.7 useLivenessβ
Enables or disables the liveness detector during the fingerprint capture process. capture process. Defaults to true.
5.1.8 useFlashβ
Enables or disables the camera flash during the fingerprint capture process. process. Defaults to true.
5.1.9 captureFingersTextβ
Sets the message (string) that is displayed on the screen after the four fingers have been detected and the user shall be instructed not to move them.
5.1.10 captureThumbTextβ
Sets the message (string) to be displayed on the screen after the thumb has been detected and the user shall be prompted not to move the thumb. detected and the user shall be prompted not to move it.
5.1.11 thumbNotInFocusTextβ
Sets the message (string) that is displayed on the screen while attempting to attempted
5.1.12 captureFingerTextβ
Sets the message (string) displayed on screen during the thumb capture process. thumb capture process.
6. Use of the componentβ
Once the component has been started and a new operation has been created (section 3), the SDK components can be launched. There are two ways to launch the component:
- [WITH TRACKING] This call allows to launch the functionality of the component normally, but internal events will be tracked to the tracking server:
let controller = PhingersController(data: phingersConfigurationData, output: output, viewController: viewController)
SDKController.shared.launch(controller: controller)
- [WITHOUT TRACKING] This call allows to launch the functionality of the component normally, but no event will be tracked to the tracking server:
let controller = PhingersController(data: phingersConfigurationData, output: output, viewController: viewController)
SDKController.shared.launchMethod(controller: controller)
The launch method must be used by default. This method allows tracking to be used if your component is enabled, and will not use it when it is disabled (or the component is not installed).
On the other hand, the launchMethod method covers a special case, in which the integrator has tracking installed and activated, but in a certain flow within the application does not want to track information. In this case, this method is used to prevent this information from being sent to the platform.
7. Receipt of the resultβ
The controllers will return the required information in SdkResult format. More information in the Result Return section.
7.1. Receipt of errorsβ
NO_OPERATION_CREATED_ERROR
COMPONENT_CONTROLLER_DATA_ERROR
CAMERA_PERMISSION_DENIED
LICENSE_CHECKER_ERROR_INVALID_COMPONENT_LICENSE
ERROR_CAPTURE_SUCCESS_WITHOUT_RESULT
CAMERA_PERMISSION_DENIED
CANCEL_BY_USER
TIMEOUT
7.2 Receipt of correct execution - dataβ
The result returns the images in Bitmap format, it is possible to convert the images to Base64 as follows:
Base64.encodeToString(this.toByteArray(), Base64.NO_WRAP)
.
The data field is variable and will depend on which component the result was returned. the result has been returned. In the case of this component, the returned fields are the following:
7.2.1 focusQuality.β
Returns the best image extracted from the authentication process in Base64 string format. This image is the original size image extracted from the camera. Valid for the liveness process.
7.2.2 fullFrameImageβ
Returns a cropped image centred on the user's face in Base64 string format. string Base64 format. This image is obtained from the bestImage. This is the image that shall be used as the characteristic image of the user who performed the process as the avatar.
7.2.3 livenessConfidenceβ
Returns an indicator of the confidence level of the catch.
7.2.4 fingersResult.β
This is a list of FingerResult objects, containing all the information associated with each finger. information associated with each of the captured fingers.
7.2.4.1 wsqβ
The fingerprint capture is returned in WSQ format.
7.2.4.2 fingerprintTemplateβ
Returns the fingerprint template, used for further validation.