Platform connection
This component requires a minimum iOS13 version
Event sending to the platform is done with the Tracking Component.
It is responsible for tracking and monitoring the information obtained during the execution of the operations. Real-time tracking of this data will be possible on the Platform, while the process is running on the client's device.
Unlike the rest, this component does not work independently; it works transversally to the rest of the components installed in the SDKMobile.
Dependencies
CocoaPods
Facephi libraries are distributed remotely via dependency managers. On iOS, it is used CocoaPods. The dependencies required that must already have been installed beforehand (by adding them to the project's Podfile) are:
pod 'FPHISDKMainComponent', '~> $VERSION'To install the component Tracking, add the corresponding dependency in the Podfile of the project, together with the mandatory dependencies of the SDK.
pod 'FPHISDKTrackingComponent', '~> $VERSION'Swift Package Manager (SPM)
If you use SPM, make sure the SDK's required dependencies are installed beforehand.
//HTTPS
https://github.com/facephi-clienters/SDK-SdkPackage-SPM.git
//SSH
[email protected]:facephi-clienters/SDK-SdkPackage-SPM.gitTo install the component Selphi, include it in the project's modules.
Permissions
In the client application where the components are to be integrated, it is necessary to include the following item in the file Info.plist when tracking is going to send location:
Location permission is only necessary if do not you configure enableLocation: false in the initializer of TrackingController. By default enableLocation es true and the component can request and send location in the events to the platform.
Integration
To reference the dependency from our Swift code:
Injection in the SDK
Initialization of the TrackingController
Create an instance of TrackingController before calling SDKController.shared.initSdk, passing it in the parameter trackingController.
enableLocation
Controls whether the component Tracking requests and sends location in the events to the platform. By default to true.
Receiving errors
Tracking controller errors are non-terminal. Unlike the rest of the SDK, they are reported through the callback injected in its initialization (trackingError in the previous initializer).
The parameter trackingError is a String that can take the following values:
APPLICATION_CONTEXT_ERROR: Error in context initialization
ASSET_LINK: Error when sending the resource link
ASSET_UPLOAD: Error during resource upload
COMPONENT_LICENSE_ERROR: Component License missing or invalid
CUSTOMER_ID: Error when obtaining or validating the customer ID
DEVICE_EVENT_ERROR: Failure during a device-related event
EMPTY_LICENSE: Empty or nonexistent License data
FLOW: Error during the execution Flow
INITIALIZATION_ERROR: General failure in Initialization
INIT_IDS_ERROR: Error when generating or assigning IDs during Initialization
INIT_OPERATION: Failed operation in the Initialization phase
LICENSE_ERROR: Invalid or corrupted License
MANAGER_NOT_INITIALIZED: The manager was used without initializing it
NETWORK_CONNECTION: Problem with the network connection
NETWORK_ERROR: Generic network failure
NO_OPERATION_CREATED_ERROR: No operation was created when one was expected
OCR_DATA: Error processing OCR data
OPERATION_NOT_CREATED: The expected operation was not generated
OPERATION_ID: Invalid or missing operation ID
SESSION_ID: Error with the session identification
SIGNATURE_RESULT: Failure in the signature process or result
STEP_CHANGE: Unexpected or invalid step transition
STEP_RESULT_CANCELLED: The step was unexpectedly cancelled
STEP_RESULT_ERROR: The step ended with an error
STEP_RESULT_EXPIRED: The step result expired before completion
STEP_RESULT_SUCCEEDED: The step succeeded but generated an unexpected issue
TOKEN_ERROR: Token missing, expired or invalid
ADVANCED_TRACKING_UPLOAD: Failure when uploading advanced Tracking data
TENANT_ID_EMPTY_ERROR: The tenant ID was empty or missing
ADVANCED_TRACKING_SERIALIZATION_ERROR: Error serializing advanced Tracking data
ADVANCED_TRACKING_VALIDATION_ERROR: Failure in Tracking data validation
TOKENIZER_ERROR: Error during the tokenization process
Last updated