React Native
⚛️ React Native Setup
🛠 Prerequisites
Before integrating the SDK, make sure your development environment is set up.
react-native >= 0.69.5- Node.js
v18+ - Android Studio (SDK 23+)
- iOS: Xcode 13+, physical iOS device (arm64 only)
- Required npm packages:
react-native-relid-idv-document-capture- `react-native-relid-idv-selfie-capture
Required Modules
npm install ./react-native-relid-idv-document-capture
npm install ./react-native-relid-idv-selfie-capturePlace SDK Files
- Place the folders for
react-native-relid-idv-document-captureandreact-native-relid-idv-selfie-capturein the root of your project. - Place
regula.license,db.dat, andCertificates.bundlein the appropriate assets folders for Android and iOS.
Configuration
- Ensure
react-native >= 0.69.5 - Android:
- Android Studio (latest)
- SDK 23+ with Jetpack
- iOS:
- Xcode 13+
- Platform version:
platform :ios, '13.0' - Physical arm64 iOS device
🤖 Additional Configurations for React Native (Android)
The following configurations are mandatory to integrate the REL-ID IDV Document Capture Module on Android for React Native apps.
1. 📦 Add the IDV npm dependencies
In your project-levelbuild.gradle, add the following flatDir repositories under allprojects.repositories:
allprojects {
repositories {
google()
maven { url("$rootDir/../node_modules/react-native/android") }
// For IDV Document Capture module
flatDir {
dirs "$rootDir/../node_modules/react-native-relid-idv-document-capture/android/libs"
}
// For IDV Selfie Capture module
flatDir {
dirs "$rootDir/../node_modules/react-native-relid-idv-selfie-capture/android/libs"
}
}
}2. 📄 REL-ID IDV Document Capture Module License
- Copy the
regula.licensefile provided by the UNIKEN team to the following path:
android/app/src/main/res/raw/
Create therawfolder if it doesn't exist.
3. 🗃️ REL-ID IDV Document Capture Module Database File
- Copy the
db.datfile to the following location:
android/app/src/main/assets/Regula/
Create theRegulafolder insideassetsif it doesn't exist.
4. 🔐 REL-ID IDV Document Capture Module PKD Certificate File
- Copy the PKD certificate (
*.ldiffile) to:
android/app/src/main/assets/certificates/
Create thecertificatesfolder insideassetsif it doesn't exist.
📦 Additional Configurations for React Native (iOS)
The following configurations are mandatory to integrate the REL-ID IDV Document Capture Module on iOS for React Native apps.
1. 🛡️ Permissions
You must add the following keys to your Info.plist file:
<key>NSCameraUsageDescription</key>
<string>Required for document and facial capture</string>
<key>NFCReaderUsageDescription</key>
<string>NFC tag to read NFC document data</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
<string>E80704007F00070302</string>
<string>A000000167455349474E</string>
<string>A0000002480100</string>
<string>A0000002480200</string>
<string>A0000002480300</string>
<string>A00000045645444C2D3031</string>
</array>Also, enable NFC capabilities for your app:
- Open project in Xcode
- Go to Signing & Capabilities
- Click on + Capability
- Add Near Field Communication Tag Reading
2. 📄 REL-ID IDV Document Capture Module License
To integrate the module:
- Share your app’s bundle ID with the UNIKEN team to get the
regula.licensefile. - Copy the
regula.licensefile to your.xcodeprojdirectory. - Drag and drop the file into the Xcode project navigator to ensure it's bundled with the app.
3. 🗃️ REL-ID IDV Document Capture Module Database File
Steps:
- Copy the
db.datfile to your.xcodeprojdirectory. - Drag and drop the file into the Xcode project navigator so that it’s bundled with the app.
4. 🔐 REL-ID IDV Document Capture Module PKD Certificate File
Steps:
- Copy the
Certificates.bundlefolder to the.xcodeprojdirectory. - Drag and drop the folder into your Xcode project navigator so that it’s bundled with the app.
📦 Build and Run Project
This section provides instructions to build and run your project integrated with the REL-ID IDV SDK.
✅ Prerequisites
Ensure:
- All REL-ID IDV SDK modules are installed correctly.
- There are no compile-time errors in your code.
| Task | Command |
|---|---|
| Build and run Android | react-native run-android |
| Build and run iOS | react-native run-ios |
⚠️ Important Notes
- The REL-ID IDV SDK supports physical devices only for testing. Simulators/emulators are not supported.
- Make sure the following files are correctly placed and bundled:
regula.licensedb.dat- PKD Certificate (
.ldiffor Android,Certificates.bundlefor iOS)
Updated 6 months ago
