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

iOS

Faceplugin Face Liveness Detection iOS SDK. On-premise PAD against photos, screens, masks, and deepfakes. Xcode frameworks, setActivation, initSDK, detectImage.

Fully on-premise Face Liveness SDK for iOS. Native class: FaceLivenessSDK.

What
Id

iOS demo app (Xcode PRODUCT_BUNDLE_IDENTIFIER)

com.faceplugin.faceliveness.app

Android demo package name

com.faceplugin.faceliveness

SDK class / framework

FaceLivenessSDK in facelivenessdk.framework

Keep the iOS demo bundle com.faceplugin.faceliveness.app so the included license works. Request a new license key if you change it.

Code

Setup

  1. Unzip the frameworks from Google Drive: facelivenessdk.framework, FaceLivenessEngine.framework, onnxruntime.framework.

  2. Add the SDK frameworks to the project in Xcode (Embed & Sign).

  3. Add FaceLivenessSDK-Bridging-Header.h to Build Settings.

Status codes: 0 Success, 1 Invalid license, 2 Expired, 3 Not activated, 4 Init failed.

APIs

setActivation: This API is used to activate the SDK

Input

  • license (NSString*): The license string (license key)

Return value

The SDK activation status code.

  • 0: Success

  • 1: Invalid license

  • 2: Expired

  • 3: Not activated

  • 4: Init failed

initSDK: This API is used to initialize the SDK

getMachineCode: This API is used to retrieve the machine code

getLicenseStatus: This API is used to read license status

detectImage: This API is used to detect faces and determine if the faces are real or fake

Input

  • image (UIImage*): The input image

Return value

JSON string with detected faces and liveness scores.

The liveness score ranges from 0.0 to 1.0. If it's greater than the threshold, it's real face. Demo default threshold is 0.5.

VideoWorker: This API is used for the live camera HUD

The liveness demo does not enroll a match database.

deinitSDK: This API is used to unload the engine

Run the demo

  1. Place facelivenessdk, FaceLivenessEngine, and onnxruntime frameworks (see Setup).

  2. Keep the Xcode bundle id com.faceplugin.faceliveness.app.

  3. Run on a physical iPhone. Home tiles: Liveness, Settings, About. The demo does not enroll a match database.

Screenshots

Sample demo UI from faceplugin-assets (face-liveness/mobile/). Not a dedicated iOS photoshoot.

Home
Liveness
Settings
About

Faceplugin Face Liveness sample demo home (mobile UI from faceplugin-assets, not a dedicated iOS photoshoot)

Faceplugin Face Liveness live camera

Faceplugin Face Liveness settings

Faceplugin Face Liveness About

Score ≥ 0.5 → real. Call setActivation → initSDK off the main thread.

Request a License & Support · Contact us

FAQ

Passive or active? Passive anti-spoofing on this product.

Screenshots? Sample demo UI from faceplugin-assets (face-liveness/mobile/). Not a dedicated iOS photoshoot.

Last updated