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

Result Reference

CafFaceLivenessLiteResult – Success Event

Field
Description

signedResponse

Opaque JWT issued with the liveness session. Forward it to your backend; the SDK does not return isAlive or images.

From 3.1.0, the signedResponse is issued when the liveness session is created and handed to your delegate the moment the capture completes — there is no post-capture wait. Use it with your backend to obtain the final liveness outcome; the SDK does not poll for it.

CafErrorType – Error Handling

The SDK reports execution errors via didFinishWithError(type:description:). Only the error types below are returned by CafFaceLivenessLite:

Error
When it is returned

invalidOptionsException

startSDK was called before setup, or the capture service URL could not be built

cameraPermission

Camera access was denied — checked by startSDK before any network request, or reported during the capture

securityException

enableSecurity: true and a security violation (jailbreak, instrumentation, hooking) is detected before or during the capture

unsupportedDevice

The device does not support the capture, or the SDK could not store the credentials in the keychain

serverException

The session request failed, no connection, or an invalid or unreadable response; the session points to an unsupported capture provider; or the capture reported a server error

tokenException

The account is not enabled for the asynchronous flow, or the session arrived without the capture token or without the signedResponse

invalidResponseException

The session arrived without the liveness attempt ID

networkException

A network error occurred during the capture.

captureAlreadyActiveException

The capture reported that another capture is already active

userTimeoutException

The user did not complete the capture in time

unexpectedErrorException

The capture reported an unexpected error

CafErrorType is shared with other CAF SDKs and also declares imageNotFoundException, tooManyRequestsException, permissionException, libraryException, unknownException, cameraException, certificateException, faceAuthentication and livenessException. CafFaceLivenessLite never returns them. If you switch over CafErrorType, add a default case rather than handling each of them.

CafFailureType – Failure References

Available feedback codes returned via didFinishWithFailure(type:description:signedResponse:). The type maps the first reason reported by the capture, and any code the SDK does not recognize is returned as unknown. description carries the localized message for that reason, and signedResponse is always present — it is the same JWT issued with the session, so forward it to your backend as you would on success:

Enum value
Localized description (English)
GPA
LA

unknown

Try again

✅

❌

tooMuchMovement

Keep still

✅

❌

tooBright

Move somewhere darker

✅

❌

tooDark

Move somewhere brighter

✅

❌

misalignedFace

Keep your face in the oval

✅

❌

faceTooFar

Move your face closer to the screen

✅

❌

faceTooClose

Move your face farther from the screen

✅

❌

sunglasses

Remove sunglasses

✅

❌

systemError

System Error

⚠️

✅

rejected

Transaction could not be completed

⚠️

✅

faceNotFound

Align your face in the oval and then try to keep still

⚠️

✅

obscuredFace

Make sure your whole face is visible and remove any accessories that might cover your face

✅

✅

timeout

System timeout

⚠️

✅

eyewear

Remove your eyewear

⚠️

✅

multipleFaces

Ensure only one person is visible

✅

✅

eyesClosed

Make sure your eyes are open

✅

✅

userNotFound

Transaction could not be completed

⚠️

✅

lightingIssues

Make sure your face is well lit and free from glare

⚠️

✅

framesBlurry

Align your face in the oval and then try to keep still

⚠️

✅

deviceIssue

Try a different device

⚠️

✅

motionIssue

Align your face in the oval and then try to keep still

⚠️

✅

backgroundIssue

Move to a different location with a neutral background

⚠️

✅

deviceRestart

Please restart your device and try again

⚠️

✅

processingFault

Please try again

⚠️

✅

Key: ✅ = will be returned, ❌ = will not be returned, ⚠️ = may be returned in the future

Atualizado