On-Device Age Estimation

With an On-Device Age Estimation configuration, age estimation will run entirely on the user’s device during Face Capture. No selfie image, video, or any PII leaves the device. Only structured analysis results (for example: liveness, face quality, and the estimated age) are submitted to Incode.

Because the biometric capture never leaves the device, the feature also skips the normal selfie image upload, video/frame recording upload, and manual capture. Age decisioning is performed on the backend from the submitted results.

Prerequisites

  • Incode Welcome iOS SDK 5.43.0 or later, -l (Login) variant included. If you have not already done so, follow the steps to install and set up the SDK.
  • End-to-end encryption (E2EE) enabled for your organization, plus your E2EE URL.
  • A flow created in Dashboard. You will need its Flow ID - this is the configurationID on the session.
⚠️

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

For server-driven flows, enable On-Device Processing on the Face Capture module in your Flow or Workflow configuration in Dashboard:

  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.



Did this page help you?