React Native SDK
react-native-dive-sdk is a React Native wrapper around the native DIVE SDKs for iOS and Android. It exposes both DIVE Online and the legacy DIVE API from a single package, so a React Native application can run the full document capture and verification flow — including auto-capture, PDF417/MRZ reading, and face liveness — without writing native code.
- Repository: github.com/IDScanNet/react-native-dive-sdk
- Full documentation: README
Note
This page is an overview. Step-by-step setup instructions, the complete API reference, and code samples are maintained in the repository README.
What It Provides
The package exposes two entry points, one for each product.
| Function | Product | Credentials Required |
|---|---|---|
launchDiveOnline() |
DIVE Online | pk_* token, integrationId, applicantId (created server side) |
launchDive() |
DIVE SDK (legacy DIVE API) | License key and DIVE API token |
Both return the same result shape — success, error, or cancelled — so a user cancelling the flow never has to be handled as an error case.
import { launchDiveOnline } from 'react-native-dive-sdk';
const result = await launchDiveOnline({
token: 'pk_publishable_token',
integrationId: 'YOUR_INTEGRATION_UUID',
baseUrl: 'https://api-diveonline.idscan.net/api/v2/',
applicantId,
});
if (result.type === 'success') {
console.log(result.requestKey);
}
The full type definitions, the verification result schema, and the list of error codes are documented in the API Reference.
Supported Platforms and Requirements
| Minimum Version | |
|---|---|
| React Native | 0.73 |
| iOS | 13.4 |
| Android | API 24 (Android 7.0) |
| Node.js | 18 |
| Expo | SDK 54+, via the bundled config plugin |
Important
The React Native New Architecture (TurboModules) is required. The Legacy Architecture is not supported.
Bundled Native SDK Versions
The wrapper pins fixed versions of the upstream native SDKs. Use this table to map a wrapper release to the corresponding native SDK changelog.
| Platform | Native SDK | Version |
|---|---|---|
| iOS | DIVE-SDK-iOS — XCFramework containing both DIVE SDK and DIVE Online | 3.251121.1 |
| Android | DIVE-SDK-Android — net.idscan.components.android:dvs |
1.14.0 |
| Android | DIVE-ONLINE-SDK-Android — net.idscan.components.android:dvsonline |
1.14.0 |
A native SDK version can be updated without upgrading the wrapper itself. See Updating the Native SDK.
Capture Capabilities
Document types: ID, Passport, PassportCard, GreenCard, InternationalId. See Supported Documents for the full coverage list.
Capture steps: front, back, pdf (PDF417 barcode), mrz (Machine Readable Zone), face.
Face liveness: controlled by the realFaceMode setting — auto, all, or none.
The capture flow is described declaratively in JavaScript, and the same step list works on both platforms.
Using with Expo
The package ships an Expo config plugin that performs every required native edit automatically during npx expo prebuild. No manual changes to Podfile, Info.plist, or build.gradle are needed.
Register the plugin in app.json:
{
"expo": {
"plugins": ["react-native-dive-sdk"]
}
}
The plugin handles:
Info.plistcamera, photo library, and location usage descriptions- the
Podfilechanges required to link the native frameworks on iOS minSdkVersionandndkVersionin the Android projectbuild.gradle- a build workaround for the
fmtpod on Xcode 26 and newer
Warning
Expo Go is not supported. The SDK ships native code that Expo Go cannot load. Use a development build (npx expo run:ios / npx expo run:android) or an EAS build.
Permission strings, the NDK version, and the remaining plugin options can be overridden. See Plugin Options.
Limitations
- NFC chip reading is not supported. Verification is based on camera capture only.
- Expo Go is not supported — a development build or an EAS build is required.
- The Legacy React Native Architecture is not supported.
- DIVE SDK does not run in the iOS Simulator — a physical device is required.
- Upload progress events are available on iOS only (an Android Fragment API limitation).
- Some capture and verification settings are platform specific and are passed through separate
iosandandroidoption objects. See Platform Differences.
Installation
The package is distributed through its public GitHub repository and is not published to the npm registry, so installing it by package name will fail.
$ npm install IDScanNet/react-native-dive-sdk#v0.2.0
Expo projects: add the config plugin to app.json and run npx expo prebuild. Nothing else is required.
Bare React Native projects: the native setup is manual — a Podfile entry, pod install, and Info.plist permissions on iOS; minSdkVersion 24 and NDK 28+ on Android. Follow iOS Setup and Android Setup.
Note
Skipping the Podfile step still builds successfully but crashes at launch with Library not loaded: @rpath/IDScanCapture.framework. This and other known build issues are covered in Troubleshooting.
Credentials
Credentials are issued by IDScan.net. Request them from support@idscan.net.
DIVE Online
- A publishable
pk_*token for the mobile application and a secretsk_*token for your server. See API Tokens. - One Bundle per platform, bound to your iOS Bundle ID and your Android Package Name respectively. Each Bundle has its own
integrationId, selected at runtime by platform. - An
applicantId, created server side through the Applicants endpoint and valid for a single verification. See Applicants.
Important
The mobile SDK never creates applicants. The sk_* token must remain on your backend and must not ship inside the application bundle.
DIVE SDK (Legacy DIVE API)
A license key bound to your iOS Bundle ID / Android Package Name, plus a DIVE API token. Generate the license on the Access Tokens page at mydive.idscan.net, or request it from support. See License Keys.
Sample Apps
Two runnable demo applications ship with the repository. Both exercise launchDive and launchDiveOnline, theme customization, and render the full verification result.
- example/ — bare React Native
- example-expo/ — Expo, identical JavaScript, driven by the config plugin
Support
- Documentation and issues: github.com/IDScanNet/react-native-dive-sdk
- Email: support@idscan.net