Skip to main content
Use this page to brief an AI coding assistant (Claude, Cursor, Copilot and others), or point it here. Every page on this site is also available as Markdown (append .md to its URL) and through the page menu’s Copy page and Open in… options.

Prompt to start with

Hard rules

  1. Never put the deepidv API key in the app. Use proxy mode: DeepIDVConfig(apiKey: <app user token>, baseURL: <your backend>/deepidv), and a backend route that checks the user and session ownership, then adds x-api-key.
  2. Never treat onResult as the verification decision. Grant access only from the session.status.verified webhook or GET /v1/sessions/{id} on the backend.
  3. Add NSCameraUsageDescription to Info.plist, or the app ends when the camera opens.
  4. Create workflow sessions on the backend with POST /v1/workflows/{workflow_id}/sessions and pass session_id to DeepIDVWorkflowView(client:sessionID:onResult:).
  5. Forward POST /v1/sessions/{id}/id-capture/detect in the proxy, or document recognition silently turns off.
  6. Present SDK views full screen and close them in onResult, which fires exactly once.
  7. Use .back for documentCamera on phones. The default is .front, for kiosks and tablets.
  8. Keep a default branch when switching on DeepIDVError.Kind, SessionStatus, APIErrorCode and the failure codes: they’re open sets.
  9. Never show error.message or failure.message to users. Write copy from kind, code or userAction.
  10. Test on a real device. The camera doesn’t work in the iOS Simulator.

Decision tree

Minimal correct integration

Facts to get right

Checking the integration

Ask your assistant to confirm:
  • No deepidv API key in the app bundle, source or config files.
  • Sessions are created on the backend; the proxy checks session ownership.
  • The proxy forwards the endpoints in Proxy mode and nothing else.
  • Access is granted from the webhook, not from onResult.
  • NSCameraUsageDescription is set.
  • documentCamera matches the device type.
  • Every switch on SDK types has a default branch.