On-Device Age Estimation

In this configuration, age estimation will run entirely on the user’s device during Face Capture. No selfie image, video, or any PII leaves the device, and only structured results are submitted to Incode.

Prerequisites

  • Incode Welcome iOS SDK 5.43.0 or later, -l (Login) variant included.
  • End-to-end encryption (E2EE) enabled for your organization, plus your E2EE URL.
  • A flow created in Dashboard. You will need its Flow ID.
⚠️

Important

If a requirement is not met (wrong SDK variant, E2EE not active, or similar), the selfie module fails with a notInitialized error.

Dashboard configuration

  1. In the left menu, click Flow Builder > Flows OR Workflows.
  2. Open your Flow or Workflow.
  3. Open the configuration panel for the Face Capture module.
  4. Enable On-Device Processing. This ensures that liveness and age estimation run entirely on the user's device. No biometric images leave the SDK.
  5. If using Workflows, click Save configurations. Flow configurations save automatically.
  6. If using Workflows, click Save & Publish. If using Flows, click Save Changes.

The SDK reads this setting from the flow automatically. There is no code flag to set.

Integration steps

1. Initialize the SDK

Initialize with your API URL, E2EE URL, and API key (e.g. in AppDelegate):

import IncdOnboarding

IncdOnboardingManager.shared.initIncdOnboarding(
    url: "<YOUR_API_URL>",
    e2eeURL: "<YOUR_E2EE_URL>",
    apiKey: "<YOUR_API_KEY>"
)

2. Create the session configuration

Use your Flow or Workflow ID and enable E2EE:

let sessionConfig = IncdOnboardingSessionConfiguration(
    configurationId: "<YOUR_FLOW_ID>",
    e2eEncryptionEnabled: true
)

3. Set presenting ViewController and start the flow

IncdOnboardingManager.shared.presentingViewController = self
IncdOnboardingManager.shared.startFlow(
    sessionConfig: sessionConfig,
    delegate: self
)

4. Handle the result in your delegate

extension MyViewController: IncdOnboardingDelegate {
    func onSelfieScanCompleted(_ result: SelfieScanResult) {
        if let error = result.error {
            // Capture failed or was cancelled
        }
        // Results are sent to Incode backend
        // and they are not returned to the app.
    }
}
📘

Note

Since images never leave the device, SelfieScanResult does not contain a selfie image.