For the complete documentation index, see llms.txt. This page is also available as Markdown.

Simplified Launch

This section shows practical examples (in Swift) for integrating and using the Facephi SDK in iOS mobile applications, adapted to the most common verification flows.

Initialize the SDK

The SDK works through a main controller (SDKController). Facephi will provide the apiKey license required for initialization.

 import core
 import sdk
 import trackingComponent
 
 ...
 
 let trackingController = TrackingController(
     trackingError: { trackingError in
         self.log("TRACKING ERROR: \(trackingError)")
     },
     enableLocation: false)

SDKController.shared.initSdk(licensingUrl: SdkConfigurationManager.LICENSING_URL, apiKey: SdkConfigurationManager.APIKEY_LICENSING, output: { sdkResult in
    if sdkResult.finishStatus == .STATUS_OK {
        self.log("Automatic License set correctly")
    } else {
        self.log("An error occurred while trying to obtain the License: \(sdkResult.errorType)")
    }
}, trackingController: trackingController)

Start operation

Before launching any component, it is mandatory start an operation.

This method has 3 input parameters:

  • operationType: Indicates whether an ONBOARDING or AUTHENTICATION process will be performed.

  • customerId: User identifier (controlled at application level).

  • steps: List of operation steps if they have been previously defined:

- Defined steps:

- Steps not defined:

Component launch

Each component has its own controller and is launched from SDKController.

Last updated