DC API verification on iOS
When to use
Verify a credential in the browser with the wallet on an iPhone/iPad. Key
platform difference vs Android: on iOS the Digital Credentials API runs
over ISO 18013-7 Annex C only, with ISO/IEC 18013-5 mdoc/mDL
credentials, and the request is always signed - expectedOrigins is
mandatory.
Before you build: run the integrator intake in igrantio-ows-overview - environment, API key, tenancy, backend host, webhooks, frontend - one question at a time, a recommended default with each.
Prerequisites
- A DC-API-capable browser (Chrome 141+, or flag-enabled earlier builds).
- The mdoc credential (e.g. age verification) in the user's Data Wallet.
- Bluetooth on both devices for cross-device (QR) flows.
Workflow
- Presentation definition - protocol ISO 18013-7 Annex C, format
ISO/IEC 18013-5 mdoc/mDL, response mode DC API signed, with
expectedOriginsset to your page origin (replay protection). - Verification request (v3) -
requestByReference: truewith thepresentationDefinitionId; readverificationHistory.dcApiRequest/dcApiProtocolfrom the response. - Invoke the wallet from the page. Use
dcApi.tsfromigrantio-verifier-frontend-getPlatformRequestpicks the Safari request variant,invokeWalletcalls the API,buildReceivePayloadreturns the{ response: <JWE> }shape a signed exchange needs. - Post the response back via your backend proxy; SSE delivers the verified result as usual.
- Verify - read verification history (v3): decode
vpTokenResponse, checkverified,isVerifiedWithTrustList,trustServiceProvider.
Adjust for your deployment
expectedOriginsmust list every origin serving the page (www and bare domain are different origins).- Detect the platform and route Android to
igrantio-dcapi-android(OpenID4VP / SD-JWT) and iOS here (Annex C / mdoc); keep the QR flow as the universal fallback. - Compose the credential query with
igrantio-dcql-*workflow skills where DCQL applies.
Cross-references
igrantio-dcapi-android- the Android variant (OpenID4VP, plain or signed).igrantio-eu-age-verification- a natural mdoc use case for this flow.igrantio-verifier-frontend-dcApi.tsreference implementation.
Source of truth
This workflow mirrors https://docs.igrant.io/docs/openID4vc-send-verify-credentials-dcapi-ios/. Before implementing, fetch that page; if it disagrees with this skill (protocols, signing requirements, endpoints), the documentation wins - follow it and report the drift so the skill can be updated.