> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Native SDKs

> Integrate Didit identity verification natively on iOS, Android, React Native, and Flutter. NFC, camera, and biometric support. Pay-per-call from $0.30.

Integrate Didit verification natively into your mobile applications with our official SDKs. Native SDKs provide a **seamless user experience**, **better performance**, and **full access to device capabilities** compared to WebView-based integrations.

<Note>
  ### **Recommended Approach**: For the best user experience, use our native SDKs instead of WebView integration. Native SDKs handle all the complexity of camera permissions, NFC reading, and liveness detection out of the box.
</Note>

***

## SDK Availability

| Platform     | Distribution                                    | Latest |     NFC     | Minimum Version                                          | Documentation                                                       |
| ------------ | ----------------------------------------------- | ------ | :---------: | -------------------------------------------------------- | ------------------------------------------------------------------- |
| iOS          | Swift Package Manager, CocoaPods                | 3.6.0  | ✅ (iOS 15+) | iOS 13.0+ (core), iOS 15.0+ (NFC)                        | [iOS SDK Guide](/integration/native-sdks/ios-sdk)                   |
| Android      | Maven (custom repo, `me.didit:didit-sdk`)       | 3.5.8  |      ✅      | API 21+ (Android 5.0)                                    | [Android SDK Guide](/integration/native-sdks/android-sdk)           |
| React Native | npm / yarn (`@didit-protocol/sdk-react-native`) | 3.3.2  |      ✅      | RN 0.76+ (New Architecture), iOS 13.0+ / Android API 24+ | [React Native SDK Guide](/integration/native-sdks/react-native-sdk) |
| Flutter      | pub.dev (`didit_sdk`)                           | 3.7.1  |      ✅      | Flutter 3.3+, Dart 3.11+, iOS 13.0+ / Android API 23+    | [Flutter SDK Guide](/integration/native-sdks/flutter-sdk)           |
| Web (JS)     | npm (`@didit-protocol/sdk-web`)                 | 0.2.0  |      —      | Any modern browser                                       | [Web SDK Guide](/integration/web-sdks/javascript-sdk)               |

<Note>
  ### **Alternative**: If a native SDK isn't available for your platform yet, you can use [WebView Integration](/integration/web-sdks/webview-in-ios-android) as a fallback.
</Note>

***

## How a verification session flows

Every native SDK consumes the same Didit verification session. The flow is:

1. **Your backend** calls [`POST /v3/session/`](/sessions-api/create-session) with `workflow_id` plus any optional context (`vendor_data`, `contact_details`, `expected_details`, `metadata`, `callback`).
2. Didit returns a `session_id`, a short-lived `session_token`, and a hosted `url`.
3. **Your mobile app** receives the `session_token` from your backend and passes it to the SDK (`startVerification(token: …)`).
4. The native SDK opens the verification UI, the user completes the steps, and the SDK returns a result with the session's terminal `status` (`Approved`, `Declined`, `In Review`, etc.).
5. **Your backend** receives the full decision via a [webhook](/integration/webhooks) (`webhook_type: "status.updated"`) and persists it.

<Info>
  The SDK result tells you the workflow outcome (status). The complete decision — document fields, face match scores, AML hits, NFC data, warnings — is delivered to your server via webhook and can also be fetched from the [Retrieve Session Decision](/sessions-api/retrieve-session) endpoint. Never trust the client-side result alone for authorisation decisions.
</Info>

All native SDKs also support a **UniLink** mode (workflow ID only, no backend required). Use UniLink for quick prototypes and the session-token method for production.

***

## iOS SDK

**When to use**: native Swift / SwiftUI / UIKit apps targeting iOS 13+.

A lightweight, server-driven iOS SDK for identity verification with minimal configuration required.

<Card title="GitHub Repository" icon="github" href="https://github.com/didit-protocol/sdk-ios">
  View source code and examples on GitHub
</Card>

**Key Features:**

* SwiftUI and UIKit support
* NFC passport/ID reading (iOS 15+; opt-in `DiditSDK/Core` subspec or `DiditSDKCore` SPM product strips NFC)
* 53 languages supported
* Customizable UI theming
* Session token or workflow ID integration

**Quick Start:**

```swift theme={null}
import DiditSDK

// Start verification
DiditSdk.shared.startVerification(token: "your-session-token")

// Handle result
.diditVerification { result in
    switch result {
    case .completed(let session):
        print("Status: \(session.status)")
    case .cancelled:
        print("Cancelled")
    case .failed(let error, _):
        print("Error: \(error)")
    }
}
```

→ [**Full iOS SDK Documentation**](/integration/native-sdks/ios-sdk)

***

## Android SDK

**When to use**: native Kotlin / Jetpack Compose / Java apps targeting Android 5.0 (API 21) or higher.

A lightweight, server-driven Android SDK for identity verification with minimal configuration required.

<Card title="GitHub Repository" icon="github" href="https://github.com/didit-protocol/sdk-android">
  View source code and examples on GitHub
</Card>

**Key Features:**

* Kotlin and Jetpack Compose support
* NFC passport/ID reading (opt-in `me.didit:didit-sdk-core` artifact strips NFC dependencies)
* ML-based document and face auto-detection on API 24+ (graceful manual-capture fallback on API 21–23)
* 53 languages supported
* Customizable UI theming
* Session token or workflow ID integration

**Quick Start:**

```kotlin theme={null}
import me.didit.sdk.DiditSdk
import me.didit.sdk.VerificationResult

// Initialize in Application.onCreate()
DiditSdk.initialize(this)

// Start verification
DiditSdk.startVerification(token = "your-session-token") { result ->
    when (result) {
        is VerificationResult.Completed -> Log.d("Didit", "Status: ${result.session.status}")
        is VerificationResult.Cancelled -> Log.d("Didit", "Cancelled")
        is VerificationResult.Failed -> Log.e("Didit", "Error: ${result.error.message}")
    }
}
```

→ [**Full Android SDK Documentation**](/integration/native-sdks/android-sdk)

***

## React Native SDK

**When to use**: cross-platform React Native or Expo apps that need a single TypeScript API across iOS and Android (RN 0.76+, New Architecture).

A cross-platform React Native SDK that wraps the native iOS and Android SDKs with a unified TypeScript API.

<Card title="GitHub Repository" icon="github" href="https://github.com/didit-protocol/sdk-react-native">
  View source code and examples on GitHub
</Card>

**Key Features:**

* Single TypeScript API for both iOS and Android
* Expo support with zero-config config plugin (development build required — no Expo Go)
* React Native CLI support
* NFC passport/ID reading (toggle off with `DIDIT_SDK_IOS_NFC_ENABLED=false` / `diditSdkAndroidNfcEnabled=false`)
* 53 languages supported (inherited from native SDKs)
* Session token or workflow ID integration

**Quick Start:**

```tsx theme={null}
import { startVerification, VerificationStatus } from '@didit-protocol/sdk-react-native';

const result = await startVerification('your-session-token');

switch (result.type) {
  case 'completed':
    console.log('Status:', result.session.status);
    break;
  case 'cancelled':
    console.log('Cancelled');
    break;
  case 'failed':
    console.log('Error:', result.error.message);
    break;
}
```

→ [**Full React Native SDK Documentation**](/integration/native-sdks/react-native-sdk)

***

## Flutter SDK

**When to use**: cross-platform Flutter apps that need a single Dart API across iOS and Android (Flutter 3.3+, Dart 3.11+).

A cross-platform Flutter SDK that wraps the native iOS and Android SDKs with a unified Dart API.

<Card title="pub.dev Package" icon="flutter" href="https://pub.dev/packages/didit_sdk">
  View package on pub.dev
</Card>

**Key Features:**

* Single Dart API for both iOS and Android
* Platform channel integration with native SDKs
* NFC passport/ID reading (toggle off with `DIDIT_SDK_IOS_NFC_ENABLED=false` / `diditSdkAndroidNfcEnabled=false`)
* 53 languages supported (inherited from native SDKs)
* Session token or workflow ID integration

**Quick Start:**

```dart theme={null}
import 'package:didit_sdk/sdk_flutter.dart';

final result = await DiditSdk.startVerification('your-session-token');

switch (result) {
  case VerificationCompleted(:final session):
    print('Status: ${session.status}');
  case VerificationCancelled():
    print('Cancelled');
  case VerificationFailed(:final error):
    print('Error: ${error.message}');
}
```

→ [**Full Flutter SDK Documentation**](/integration/native-sdks/flutter-sdk)

***

## Web SDK (JavaScript)

**When to use**: browser-based apps and web frameworks (React, Vue, Angular, Next.js, Nuxt, Svelte, vanilla JS). The Web SDK opens the hosted verification flow in a modal or inline iframe — for mobile apps, prefer the native SDKs above.

A JavaScript SDK for web applications with React, Vue, Angular, Next.js, Nuxt, Svelte, and vanilla JS support.

<Card title="NPM Package" icon="npm" href="https://www.npmjs.com/package/@didit-protocol/sdk-web">
  View package on npm
</Card>

**Key Features:**

* Programmatic session management and event callbacks
* React, Vue, Angular, Next.js, Nuxt, Svelte, and vanilla JS support
* Full TypeScript support
* Modal & inline (embedded) modes
* State management for custom UI

**Quick Start:**

```typescript theme={null}
import { DiditSdk } from '@didit-protocol/sdk-web';

DiditSdk.shared.onComplete = (result) => {
  switch (result.type) {
    case 'completed':
      console.log('Status:', result.session?.status);
      break;
    case 'cancelled':
      console.log('Cancelled');
      break;
    case 'failed':
      console.error('Error:', result.error?.message);
      break;
  }
};

DiditSdk.shared.startVerification({
  url: 'https://verify.didit.me/session/session-token'
});
```

→ [**Full JavaScript SDK Documentation**](/integration/web-sdks/javascript-sdk) | [**All Web SDKs**](/integration/web-sdks/overview)

***

## Choosing an integration

Native SDKs are the best fit when you need NFC e-passport reading, the lowest-latency camera capture, and an in-app experience indistinguishable from your other native screens. Use **WebView Integration** as a fallback when you cannot ship a native SDK update (for example, brownfield apps you cannot rebuild, or platforms without a Didit native SDK).

| Feature                              |                 Native SDKs                |                   WebView                   |
| ------------------------------------ | :----------------------------------------: | :-----------------------------------------: |
| User experience                      |    Native screens, full gesture support    | Hosted web flow in a system browser/WebView |
| Camera capture                       |   On-device, SDK-tuned for ID and selfie   |              Browser-dependent              |
| NFC e-passport reading               | ✅ Supported (iOS 15+, NFC-capable Android) |               ❌ Not available               |
| Liveness performance                 |             Native ML pipeline             |             Browser ML pipeline             |
| White-label theming                  |              ✅ Console-driven              |               ✅ Console-driven              |
| App Store / Play Store review impact |    Adds NFC entitlement and binary size    |           None — just opens a URL           |
| When to use                          |   Production apps, NFC workflows, best UX  | Quick integration, web-only stack, fallback |
