iOS Liveness SDK FAQ

1. How to configure the SDK to use specific languages?

Currently, this SDK supports English (en), Simplified Chinese (zh-Hans), Indonesian (id), Vietnamese (vi), Thai (th), Mexican (es), Bahasa Melayu (ms), Hindi (hi), Filipino(fil).

The SDK will use the corresponding resource file according to the current language of the device. If this device language is not in the above languages, the SDK will use English by default.

If you want to support only a fixed language, you can set the language property of AAILivenessViewController.

2. How to customize the UI?

AAILivenessViewControllerprovides some public interfaces and properties for customization, if you want to deep customize the UI or logic, you can inherit fromAAILivenessViewController and override its methods.

For example, you can override the updateStateLabel:key: method to customize the localized string, or override the loadAdditionalUI method to show your own UI elements.

If you want to show your own activity indicator view, you can set the showHUD property of AAILivenessViewController to false, then implement the beginRequestBlk and endRequestBlk of AAILivenessViewController.h to show your own activity indicator view.

For more information, please refer to the demo project LivenessSDKSwiftDemo in the SDK package.

3. How to customize the localized string?

There are two ways to customize the localized string:

4. How to customize the font?

You can set the font property of AAILivenessViewController to apply a custom font across the detection UI. When set, the font family is applied (while preserving each control's original point size) to:

When font is nil (the default), the SDK uses its built-in system fonts.

Note: The size parameter passed to UIFont(name:size:) is not used directly by the SDK — each control applies [font fontWithSize:<controlSize>] internally to keep the original size hierarchy. You may pass any positive value (e.g. 16).

To use a custom .ttf / .otf font, add the font file to your Xcode project, declare it under the UIAppFonts key in Info.plist, and use its PostScript name as the font name. To find the PostScript name, open the font file in Font Book on macOS and look for the "PostScript name" field.

5. How to turn voice prompt on or off?

Configure the livenessViewController.playAudio to enable or disable voice prompt.

6. Error: Access for this account is denied

You need to bind your app bundleId to the accessKey secretKey on our CMS website.(Personal Management -> ApplicationId Management)

7. What are the SDK initialization methods, their differences, and how to use them?

Currently, the SDK has three initialization methods: initialization with license (recommended), initialization with static key (deprecated, not recommended), and initialization with ticket (deprecated, not recommended).

For compatibility reasons, these methods still work in version 4.x, but we recommend using only one initialization method throughout your app's lifecycle. Avoid mixing different initialization methods (although supported, it's not recommended).

Note: If you use different initialization methods in your app, you need to initialize the SDK before each use. For example, after completing the license initialization flow, if you want to use static key initialization, you need to call the corresponding initialization method again, otherwise the SDK will not function properly.

Below are the instructions for each initialization method:

  1. License Initialization:This is the recommended method, used as follows:
  1. Static key for initialization:This method is deprecated due to the risk of accessKey leakage. It remains available only for compatibility.
  1. Ticket initialization::This method is deprecated. If upgrading from an older version, refer to the following usage for compatibility.