Installation
Coming from @getvouch/react-native-sdk? That legacy package is deprecated and frozen at 0.9.9. This section documents its replacement, @getvouch/mobile-sdk — see the migration guide.
Requirements
Before installing the Vouch React Native SDK, ensure your app meets the following requirements:
- React Native: 0.81.5 – 0.83.x, React: 19.1 – 19.2
- iOS: 16.4 or later
- Android: API level 26 (Android 8) or later
- Peer dependencies your app must provide:
react-native-safe-area-context(>=5.6 <6),react-native-svg(>=15.12 <16),react-native-video(>=6.17 <7),react-native-webview(>=13.15 <14)
The peer ranges in the SDK's package.json are authoritative — your package manager will warn if your versions fall outside them.
Install the package
npm install @getvouch/mobile-sdkyarn add @getvouch/mobile-sdkpnpm add @getvouch/mobile-sdkbun add @getvouch/mobile-sdkIf your app does not already include them, install the peer dependencies the same way:
npm install react-native-safe-area-context react-native-svg react-native-video react-native-webviewBuild the native projects
The SDK autolinks its native module on both platforms (iOS via CocoaPods, Android via Gradle). No manual native setup is needed for regular web-proof verification, and use_frameworks! is not required in your Podfile.
A new native module still means a native rebuild — reloading JavaScript is not enough:
- Expo: regenerate the native projects and rebuild —
npx expo prebuild, thennpx expo run:ios/npx expo run:android, or a new EAS build. - Bare React Native:
cd ios && pod install, then rebuild the app from Xcode ornpx react-native run-ios. Android picks the module up on the next Gradle build.
Verification
After installation, verify the SDK resolves by importing it in your React Native code:
import { VouchVerifierProvider, useVouch, VouchScreen } from "@getvouch/mobile-sdk";If the import succeeds, the SDK has been installed correctly. Continue to the Usage Guide to integrate the verification flow.
Video verification (optional)
Some data sources use video verification instead of a cryptographic web proof. Regular web-proof flows need no extra setup, and Android video verification autolinks too. Video verification on iOS additionally requires the SDK's Expo config plugin:
{
"expo": {
"plugins": [["@getvouch/mobile-sdk", { "appGroupIdentifier": "group.<your-bundle-id>" }]]
}
}appGroupIdentifier is optional and defaults to group.<your-bundle-id>.vouch. The plugin changes the native project, so after adding it run npx expo prebuild and rebuild. See video verification for details.
Troubleshooting
Module not found or native module missing
- Reset the Metro bundler cache:
npx react-native start --reset-cache - Make sure you rebuilt the native app after installing (see Build the native projects) — a JS-only reload cannot load a new native module.
Pod install fails
Clear the CocoaPods cache and reinstall:
cd ios
pod cache clean --all
rm -rf Pods Podfile.lock
pod install