VeryAI Raises $10M Seed Round
Integration Methods /

iOS Integration

iOS Integration

1. Install the SDK

CocoaPods

pod 'VerySDK'

Then run pod install.

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/veroslabs/very-sdk-ios.git", from: "1.0.28")
]

2. Configure your app

Add camera permission to Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera access is needed for palm biometric verification.</string>

3. Enroll a new user

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

// Check device support first
guard VerySDK.isSupported() else {
    print("Device not supported")
    return
}

let config = VeryConfig(
    sdkKey: "your_sdk_key",    // from Developer Portal
    userId: nil,                // nil = new enrollment
    themeMode: "dark"           // "dark" or "light"
)

VerySDK.authenticate(
    from: self,
    config: config,
    presentationStyle: .modal   // .modal, .push, or .embed
) { result in
    if result.isSuccess {
        // Send result.code to your backend to exchange for id_token
        print("Auth code: \(result.code)")
        print("User ID: \(result.userId)")
    } else {
        print("Error: \(result.errorType) — \(result.errorMessage ?? "")")
    }
}

4. Verify an existing user

Pass the user's ID from a previous enrollment to verify their identity.

let config = VeryConfig(
    sdkKey: "your_sdk_key",
    userId: "vu-1ed0a927-...",  // existing user's ID from previous enrollment
    themeMode: "dark"
)

VerySDK.authenticate(
    from: self,
    config: config,
    presentationStyle: .modal
) { result in
    if result.isSuccess {
        print("Verified: \(result.code)")
    } else {
        print("Error: \(result.errorType) — \(result.errorMessage ?? "")")
    }
}

5. Exchange the auth code (backend)

When authentication succeeds, the SDK returns an authorization code in result.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": "user@example.com",
  "exp": 1761013475,
  "iat": 1761009875
}
  • For enrollment: store the sub (user ID) — use it for future verifications
  • For verification: confirm the sub matches the expected user

VeryConfig

Parameter Type Description
sdkKey String Your SDK API key from the Developer Portal
userId String? nil for enrollment, user ID for verification
language String? Locale code (e.g. "en", "es"). Defaults to device language.
themeMode String "dark" (default) or "light"
baseUrl String? Override API endpoint (for staging/testing)
livenessMode VeryLivenessMode .gesture (default) or .touch

VeryResult

Property Type Description
isSuccess Bool true if authentication completed successfully
code String Authorization code to exchange for id_token
userId String The user's VeryAI ID
signedToken String? Signed JWT token (when available)
errorType VeryErrorType Typed error code (see Error Handling)
errorMessage String? Human-readable error message

Presentation styles

  • .modal — presented as a modal sheet (default)
  • .push — pushed onto the current navigation stack
  • .embed — embedded as a child view controller

Important: The client_secret for token exchange must only be stored on your backend. Never embed it in the mobile app.

VeryAI

Get the VeryAI app

Scan the QR code to download the app