Full documentation: https://very.org/docs/native-sdk/integration
dependencies: [
.package(url: "https://github.com/veroslabs/very-sdk-ios.git", from: "1.0.19")
]pod 'VerySDK'Then run pod install.
Add to Info.plist:
<key>NSCameraUsageDescription</key>
<string>Camera access is needed for palm biometric verification.</string>Package source: github.com/veroslabs/very-sdk-ios (SPM / CocoaPods)
Native SDK keys are not yet available via the Developer Portal. Contact [email protected] to get your SDK key and client credentials.
Pass nil for userId to register a new user. The SDK opens a consent screen, collects the user's email, then guides them through a palm scan.
import VerySDK
guard VerySDK.isSupported() else {
print("Device not supported")
return
}
let config = VeryConfig(
sdkKey: "your_sdk_key",
userId: nil, // nil = new enrollment
themeMode: "dark"
)
VerySDK.authenticate(
from: self,
config: config,
presentationStyle: .modal
) { result in
if result.isSuccess {
print("Auth code: \(result.code)")
} else {
print("Error: \(result.errorType) — \(result.errorMessage ?? "")")
}
}Pass the user's ID from a previous enrollment to verify their identity.
let config = VeryConfig(
sdkKey: "your_sdk_key",
userId: "vu-1ed0a927-...", // from previous enrollment
themeMode: "dark"
)
VerySDK.authenticate(from: self, config: config) { result in
if result.isSuccess {
print("Verified: \(result.code)")
}
}When authentication succeeds, the SDK returns an authorization code. Send this to your backend, which exchanges it for an id_token:
POST https://api.very.org/oauth2/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&client_id=your_client_id
&client_secret=your_client_secret
&code=AUTH_CODE_FROM_SDK
&redirect_uri=your_redirect_uri
Response:
{
"access_token": "eyJhbGciOi...",
"token_type": "Bearer",
"expires_in": 3600,
"id_token": "eyJhbGciOi..."
}Decode the id_token JWT to get the user's identity:
{
"iss": "https://connect.very.org",
"sub": "vu-1ed0a927-a336-45dd-9c73-20092db9ae8d",
"aud": ["your_client_id"],
"email": "[email protected]",
"exp": 1761013475,
"iat": 1761009875
}- For enrollment: store the
sub(user ID) — pass it asuserIdfor future verifications - For verification: confirm the
submatches the expected user
Important: The
client_secretfor token exchange must only be stored on your backend. Never embed it in the mobile app.
| Parameter | Type | Default | Description |
|---|---|---|---|
sdkKey |
String | required | Your SDK API key |
userId |
String? | nil | Nil for enrollment, user ID for verification |
language |
String? | device | Locale code (e.g. "en", "es", "ja"). 35 languages supported. |
themeMode |
String | "dark" |
"dark" or "light" |
baseUrl |
String? | production | Override API endpoint (for staging/testing) |
presentationStyle |
Enum | .modal |
.modal, .push, or .embed |
livenessMode |
Enum | .gesture |
.gesture or .touch |
| Property | Type | Description |
|---|---|---|
isSuccess |
Bool | Whether authentication completed successfully |
code |
String | Authorization code to exchange for id_token on your backend |
userId |
String | The user's VeryAI ID |
signedToken |
String? | Signed JWT token (when available) |
error |
String? | Error code string |
errorType |
VeryErrorType | Typed error (see Error Codes) |
errorMessage |
String? | Human-readable error message |
- iOS 16.4+
- Swift 5.0+ / Xcode 16+
- Camera permission
- Physical device recommended
Use VerySDK.isSupported() to check device compatibility at runtime before showing the verification UI.