Capture API
| Method | Description |
|---|---|
prepareSelfieCamera(_:config:) | Prepares the selfie camera |
prepareSelfieCamera(_:config:prepareInfo:) | Prepares the selfie camera with PrepareInfo metadata |
prepareDocumentCamera(_:config:) | Deprecated since iOS SDK 3.5.0. Prepares the document camera |
open(_:) | Opens the prepared selfie camera |
open(_:webAppToken:) | Opens the selfie camera for a User Journey, passing the journey token |
open(_:idSmartOptions:) | Opens the selfie camera against a reference process, passing UnicoIDSmartOptions |
openDocument(_:delegate:) | Deprecated since iOS SDK 3.5.0. Opens the prepared document camera with a DocumentEnums |
For security reasons, iOS SDK 3.5.0 and later no longer include the native document capture. The public API still exists for now, but calling it returns error 73905, "Unable to open document camera". It will be removed in an upcoming version. For more information, contact your CSM.
PrepareInfo — metadata to identify the user session.
| Field | Type | Required | Description |
|---|---|---|---|
externalUserId | String | yes | User identifier within your system. Hashed with SHA-256 before transmission. |
useCase | String | no | Identifier for the context or flow currently running. Transmitted in plain text. |
UnicoIDSmartOptions — reference process for the capture. Available from iOS SDK 3.4.0.
| Field | Type | Required | Description |
|---|---|---|---|
referenceProcessId | String | yes | Id of an earlier, concluded process of the same user, created by your account (for example, the user's Onboarding). Use the id that the Unico API returned when that process was created. This capture compares against it. |
useCase | String | yes | Context of the operation. Use one of the values listed in Smart Revalidation. |
This option requires Smart Revalidation enabled for your account. Contact your Unico representative before you use it. Without it, the camera runs the regular capture.
DocumentEnums — Deprecated since iOS SDK 3.5.0. See Enums.
SelfieResult — object returned on successful selfie capture.
| Field | Type | Description |
|---|---|---|
base64 | String | Captured image in Base64 |
encrypted | String | JWT to be sent to the backend |
DocumentResult — Deprecated. Never returned since iOS SDK 3.5.0. Object returned on successful document capture. Same fields as SelfieResult.