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

Building the SDK

Creating a Liveness SDK instance

Instantiate CafFaceLivenessLiteSDK directly and configure behavior via the constructor and setup parameters.

Constructor

CafFaceLivenessLiteSDK(enableSecurity: Bool = true)
Parameter
Type
Required
Description

enableSecurity

Bool

No

Enables security monitoring: jailbreak detection, instrumentation detection, and dylib monitoring. Default: true. Disable only in automated testing environments.

setup Parameters

From 3.0.0, configuration is supplied to setup rather than to startSDK.

Parameter
Type
Required
Description

mobileToken

String

Yes

Mobile authentication token

personId

String

Yes

Person ID for liveness

environment

CafEnvironment (enum)

No

.prod (default), .beta, .dev

loading

Bool

No

Shows SDK loading screen (default: true)

customLocalization

String?

No

Use a custom strings table/bundle prefix (e.g., "stringsBundle")

customLocalizationBundle

Bundle?

No

Bundle that contains the custom strings table (maps to iProov options.stringsBundle)

uiCustomization

CerttaUiCustomization?

No

Optional visual branding for the liveness screen: header bar, prompt, mask area and font. See UI Customization

Note: customLocalization maps to the iProov strings table name (omit the .strings extension). When strings live outside the main app bundle (for example inside a redistributed framework), also pass customLocalizationBundle. See the iProov localization guide: iProov Localization.

prewarm

Optional. Requests the session ahead of time so startSDK can open the camera without waiting on the network. Takes no parameters, reports nothing, and is a no-op before setup. The prewarmed session is valid for 90 seconds; if it is unavailable when you start, the SDK falls back to the regular flow. See Start Liveness Verification.

startSDK Parameters

Parameter
Type
Required
Description

viewController

UIViewController

Yes

The presenting view controller

Calling startSDK before setup reports didFinishWithError(type: .invalidOptionsException, description:).

From 2.0.0, Face Auth (executeFaceAuth) is no longer available on Lite. After a successful capture the SDK starts an async transaction and returns only signedResponse; your backend retrieves the final liveness result out-of-band.

getVersion

Available from 7.8.0. Static method that returns the SDK version as a String. It needs no instance and no setup, which makes it handy for logging and support tickets.

Example

Atualizado