Installation
Under Development: This SDK is currently in development. Documentation and API may change. For production use, please contact our team.
Requirements
Before installing the vouch React Native SDK, ensure your development environment meets the following requirements:
- React Native: 0.71.0 or later (Turbo Modules support required)
- iOS Deployment Target: iOS 14.0 or later
- Minimal iOS version to perform a proof: iOS 16.4 or later
- Minimal Android SDK version: 33
- CocoaPods: 1.10.0 or later
- Xcode: 16.4 or later
Installation
Step 1: Install the npm package
npm install @getvouch/react-native-sdk
# or
yarn add @getvouch/react-native-sdkiOS
Step 2: Configure your Podfile
Open your ios/Podfile and ensure use_frameworks! is enabled. This is required for the Vouch SDK:
platform :ios, '14.0'
target 'YourApp' do
use_frameworks!
# ... other pods
endStep 3: Install iOS dependencies
Navigate to your iOS directory and install the CocoaPods dependencies:
cd ios
pod installStep 4: Open the workspace
After installation, make sure to open the .xcworkspace file (not the .xcodeproj) to work with your project:
open YourApp.xcworkspaceImportant: Always use the .xcworkspace file after installing CocoaPods dependencies. Opening the .xcodeproj directly will result in missing dependencies.
Android
Step 2: Configure minimum SDK version
Open your android/app/build.gradle and ensure the minSdkVersion is set to 33 or higher:
android {
defaultConfig {
minSdkVersion 33
// ... other config
}
}Step 3: Sync and build
Sync your Gradle files and build the project:
cd android
./gradlew clean
./gradlew assembleDebugOr open the project in Android Studio and sync Gradle files from there.
Important: The Vouch SDK requires Android API level 33 (Android 13) or higher. Devices running older Android versions will not be able to use the SDK.
Verification
After installation, verify the SDK is properly integrated by importing it in your React Native code:
import VouchSDK from '@getvouch/react-native-sdk';
console.log('VouchSDK loaded:', VouchSDK !== undefined);If the import succeeds without errors, the SDK has been installed correctly. You can now proceed to the Usage Guide to learn how to integrate verification flows into your application.
Troubleshooting
Pod install fails
If pod install fails, try the following:
-
Update CocoaPods:
sudo gem install cocoapods -
Clear the CocoaPods cache:
cd ios pod cache clean --all rm -rf Pods Podfile.lock pod install -
Ensure your Podfile has the correct iOS deployment target and
use_frameworks!:platform :ios, '14.0' target 'YourApp' do use_frameworks! # ... end
Module not found
If you see "Module not found" errors:
-
Clean the build:
cd ios xcodebuild clean -
Reset Metro bundler cache:
npx react-native start --reset-cache