Skip to main content
The iOS SDK presents the idto verification flow modally and returns a typed result. Use IDto.present from UIKit with async/await, or IDtoVerificationView from SwiftUI.
Aadhaar verification method choice screen

The Aadhaar step lets the user choose how to verify.

Requirements

You also need a client_id and client_secret (kept on your server), a workflowTemplateId, and a backend route that mints a client token. See Authentication.

Install

The package is distributed through Swift Package Manager from a private repository. Ask tech@idto.ai for access. Then, in Xcode, choose File, Add Package Dependencies and enter:
Pin Up to Next Major from 0.1.0 and add the IDto library to your app target. In a Package.swift, add the package:
Then list .product(name: "IDto", package: "idto-swift-sdk") in your target’s dependencies. import IDto gives you the whole public API.

Permissions

Add both keys to your app’s Info.plist. The SDK refuses to start without them.
If a key is missing, IDto.present throws IDtoError.missingUsageDescription(key:), and IDtoVerificationView calls onError with error == "missing_usage_description". The SDK asks for camera access before the flow needs it. If the user declines, the flow shows its own guidance screen.

Quick start (UIKit)

1

Mint a client token on your server

Your server calls POST /auth/sdk/token with client_id and client_secret and returns only access_token to the app. Recipes: Node, Python, Go.
2

Present the flow

IDto.present throws only before the flow starts: IDtoError.sessionAlreadyActive when a flow is already open, or missingUsageDescription. Afterwards it returns an IDtoResult whose status is .completed, .closed, .abandoned or .error, with completed or error filled in.
3

Confirm the result on your server

Callbacks drive your UI only. Confirm the session from your server with the session result recipe or a signed webhook before you grant access.

Quick start (SwiftUI)

IDtoVerificationView is driven by a Binding<Bool>. Set it to true to open the flow; the SDK sets it back to false when the flow ends.
PAN verification result screen

A PAN result returned by the flow.

Configuration

IDtoConfig(clientToken:workflowTemplateId:) is required. Every other parameter is optional.

Callbacks

Every payload also carries raw, the original dictionary. error values other than the ones named on this page are readable messages to log, not to match on.

See it run

Was this page helpful? Email us at tech@idto.ai with the page link.
Last modified on October 4, 2026