.md to its URL) and through the page menu’s Copy page and Open in… options.
Prompt to start with
Hard rules
- 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 addsx-api-key. - Never treat
onResultas the verification decision. Grant access only from thesession.status.verifiedwebhook orGET /v1/sessions/{id}on the backend. - Add
NSCameraUsageDescriptiontoInfo.plist, or the app ends when the camera opens. - Create workflow sessions on the backend with
POST /v1/workflows/{workflow_id}/sessionsand passsession_idtoDeepIDVWorkflowView(client:sessionID:onResult:). - Forward
POST /v1/sessions/{id}/id-capture/detectin the proxy, or document recognition silently turns off. - Present SDK views full screen and close them in
onResult, which fires exactly once. - Use
.backfordocumentCameraon phones. The default is.front, for kiosks and tablets. - Keep a
defaultbranch when switching onDeepIDVError.Kind,SessionStatus,APIErrorCodeand the failure codes: they’re open sets. - Never show
error.messageorfailure.messageto users. Write copy fromkind,codeoruserAction. - 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. -
NSCameraUsageDescriptionis set. -
documentCameramatches the device type. - Every
switchon SDK types has adefaultbranch.