Skip to main content
Launch Dojah’s verification flow in a React Native app — one codebase for iOS and Android. There are two packages: one for bare React Native CLI projects and one for Expo projects.
Mobile SDKs launch by WidgetID — you design the flow in EasyOnboard and its WidgetID identifies it. See Choosing an SDK.

Pick your package

Both packages contain native code, so the flow cannot run in Expo Go. Expo projects need a development build — either from EAS Build or from a local npx expo run:ios / run:android.
Requirements are the same either way: iOS 14+ and Android SDK 21+.

React Native CLI

Install

Terminal

iOS setup

Add the Dojah pods to your app target in ios/Podfile, then install them:
ios/Podfile
Terminal
Add the usage descriptions your flow needs to Info.plist: NSCameraUsageDescription, NSMicrophoneUsageDescription (video), and NSLocationWhenInUseUsageDescription (address/location checks).
The SDK presents itself from a navigation controller, so your root view must be inside one. In AppDelegate.mm:
AppDelegate.mm
Replace @"YourApp" with your app’s registered module name.

Android setup

Add JitPack to your repositories — in android/build.gradle or android/settings.gradle:
android/build.gradle
Permissions ship with the package, so there’s nothing to add to your manifest.

Launch the flow

App.js
Pass null for the reference ID and email if you aren’t using them.

Expo

Install

Terminal

Configure app.json

Add the Dojah config plugin, the iOS usage descriptions, and the extra pods the native SDK needs:
app.json
The Dojah config plugin already raises compileSdkVersion, targetSdkVersion, buildToolsVersion, the Android Gradle Plugin (8.9.1+) and the Gradle wrapper during prebuild — it never lowers values you set higher. The expo-build-properties Android block above just pins them explicitly.
Then generate the native projects:
Terminal
Skip this step if you build with EAS and don’t keep ios/ and android/ in your repo — EAS runs prebuild on the build worker for you.

Launch the flow

DojahKycSdk.launch() returns a promise that resolves to the flow’s exit status:
App.js
The optional fourth argument also accepts govId, location, businessData, and address.
Don’t trust the client for the final decision. approved means the user finished the flow, not that they passed every check. Confirm the outcome server-side with the reference_id — via Get verification or a webhook — before granting access.

Build with EAS (no Xcode required)

EAS Build compiles your app on Expo’s hosted macOS and Linux workers. That means you can produce an installable — and store-ready — iOS build from Windows or Linux without a Mac or a local Xcode install. It’s the recommended path for Expo projects using the Dojah SDK, since the SDK’s native code rules out Expo Go.
1

Install the tooling

Terminal
expo-dev-client is what makes a custom build usable as a development client — you keep fast refresh and the dev menu while running your own native code.
2

Create your build profiles

Generate eas.json, then define the profiles you need:
Terminal
eas.json
Use ios-simulator when you just want to run the flow on an iOS Simulator — those builds need no Apple Developer account. The development profile produces a device build, which does. resourceClass: "large" is optional; it speeds up the long CocoaPods step (Realm plus the Dojah pod) and isn’t available on the free plan.
3

Register test devices (iOS device builds only)

Terminal
This registers a device UDID with your Apple team so the ad hoc provisioning profile covers it. Skip it for simulator builds.
4

Check what EAS will build from

EAS runs npx expo prebuild on the worker, so everything in the app.json plugin block above is applied there — you don’t need to commit native folders.If you have committed ios/ and android/, EAS uses them as-is and skips prebuild. In that case run npx expo prebuild --clean locally and commit the result whenever you change your Dojah or build-properties config.
5

Run the build

Terminal
On the first iOS build, EAS offers to generate and store your distribution certificate and provisioning profile — accept it, or supply your own credentials. Build logs stream in the terminal and stay available on your project’s page at expo.dev.
6

Install it and start developing

When the build finishes, the CLI prompts to install it on a connected device or a running simulator. Then start the bundler:
Terminal
Your app now launches the real Dojah flow. JavaScript changes reload instantly — you only rebuild when native dependencies change.
7

Ship to the stores

Terminal
eas submit uploads the binary to App Store Connect (or Google Play with --platform android) from the same machine — again, no Xcode or Transporter needed.
Native changes need a new build. eas update ships JavaScript over the air only. Installing or upgrading dojah-kyc-sdk-react-expo, or editing the plugin config, always requires a rebuild.

ProGuard / R8 rules for Android release builds

EAS production builds run R8 minification. If you’ve enabled shrinking, add keep rules or the SDK will fail at runtime with ClassNotFoundException, NoSuchMethodError, or a blank WebView. In Expo, set them through expo-build-properties — no proguard-rules.pro file needed:
app.config.ts
Bare CLI projects add the same rules to android/app/proguard-rules.pro instead.

Troubleshooting EAS builds

The DojahWidget pod is fetched from a Git branch, and EAS caches it between builds. Force a fresh checkout:
Terminal
The error mentions compiling against API 36 or needing AGP 8.9.1+. Make sure "dojah-kyc-sdk-react-expo" is listed in your plugins array — the plugin raises those versions during prebuild. If you keep native folders in the repo, re-run npx expo prebuild --clean and commit.
The native SDK requires iOS 14 or later. Set ios.deploymentTarget in the expo-build-properties plugin config ("15.1" is a safe value for recent Expo SDKs) and rebuild.
A usage description is missing. Every permission your flow touches needs an infoPlist entry in app.json — iOS terminates the app when one is absent.
Almost always R8 stripping the SDK. Add the ProGuard rules above. To confirm the cause quickly, temporarily disable shrinking and rebuild.

WebView fallback

If you need a UI the native launcher doesn’t provide, render the hosted flow in a WebView:
Verify.jsx
You can prefill the flow with query parameters such as user_data[first_name], user_data[email], user_data[dob], and metadata[user_id].

Resources

React Native CLI Expo Underlying native SDKs