Flutter
💙 Flutter Setup
🛠 Prerequisites
Before integrating the SDK, make sure your development environment is set up.
- Flutter v3.10., Dart v3.0., DevTools v2.23.*
- Android SDK 23+, Jetpack supported
- Xcode 13+, iOS device (arm64 only)
Required Plugins
Update pubspec.yaml
:
dependencies:
rdna_idv_document_capture:
path: ./rdna_idv_document_capture
rdna_idv_selfie_capture:
path: ./rdna_idv_selfie_capture
Then run:
flutter pub get
Place SDK Files
- Place
regula.license
,db.dat
, andCertificates.bundle
in Android and iOS asset directories as per your Flutter setup.
Configuration
- Flutter
3.10.*
, Dart3.0.*
, DevTools2.23.*
- Android:
- Android Studio (latest)
- SDK 23+ with Jetpack
- iOS:
- Xcode 13+
- Platform version:
platform :ios, '13.0'
- CocoaPods required
- Physical arm64 device
🤖 Additional Configurations for Flutter (Android)
The following configurations are required to integrate the REL-ID IDV Document Capture Module in Flutter applications targeting Android.
1. Add the IDV Plugin Repositories -- ??? ( is this needed )
In your project-levelbuild.gradle
, add the following flatDir
repositories under allprojects.repositories
:
allprojects {
repositories {
google()
mavenCentral()
// For IDV Document Capture module
flatDir {
dirs "$rootDir/../flutter_idv_document_capture/android/libs"
}
// For IDV Selfie Capture module
flatDir {
dirs "$rootDir/../flutter_idv_selfie_capture/android/libs"
}
}
}
2. REL-ID IDV Document Capture Plugin License
- Get the
regula.license
file from the UNIKEN team. - Copy the file to the following path:
android/app/src/main/res/raw/
Create theraw
folder if it doesn’t exist.
3. REL-ID IDV Document Capture Plugin Database File
- Copy the
db.dat
file to:android/app/src/main/assets/Regula/
Create theRegula
folder insideassets
if it doesn’t exist.
4. REL-ID IDV Document Capture Plugin PKD Certificate File
- Copy the PKD certificate files (
*.ldif
) to:android/app/src/main/assets/certificates/
Create thecertificates
folder insideassets
if it doesn’t exist.
🍎 Additional Configurations for Flutter (iOS)
The following configurations are required to integrate the REL-ID IDV Document Capture Module in Flutter applications targeting iOS.***
1. ⚙️ Linker Flags
To avoid runtime issues with linking, add the following in Xcode:
- Select the project file from the project navigator on the far left side of thewindow.
- Select the target name where you want to add the linker flag.
- Select "Build Settings" tab
- Choose "All" to show all Build Settings.
- Scroll down to the "Linking" section, and double-click to the right of where it says"Other Linker Flags".
- A box will appear, Click on the "+" button to add a new linker flag.
- Type $(inherited) and press enter.***
2 🛡️ Permissions
The REL-ID IDV Framework makes use of the device Camera. You will be required to have theNSCameraUsageDescription keys in your application's Info.plist file:Add the following permissions to your app's Info.plist
file:```xml
<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>
The REL-ID IDV Document Capture Framework makes use of RFID to read the document which has a RFID chip. You need to add capabilities to the
project target and also the provisioning profile used for the target bundle.
Follow below steps to enable NFC capabilities for the target.
<br />
* Open the project in Xcode.
* Select the app target.
* Go to **Signing & Capabilities**.
* Click **+ Capability** and add **Near Field Communication Tag Reading**.***
### 3. 📄 REL-ID IDV Document Capture Plugin License
  
* Request the `regula.license` file from the UNIKEN team.
* Copy the regula.license in the root directory of our xcode project where your
  
\<project-name > .xcodeproj file resides.
* Drag and drop the file into the Xcode project navigator to include it in the app bundle.***
### 4. 🗃️ REL-ID IDV Document Capture Plugin Database File
  
* Copy the `db.dat` file to your `.xcodeproj` directory.
* Drag and drop it into the Xcode project navigator to bundle it with the app.***
### 5. 🔐 REL-ID IDV Document Capture Plugin PKD Certificate File
  
* Copy the `Certificates.bundle` folder to the root of your `.xcodeproj` directory.
* Drag and drop the folder into the Xcode project navigator to include it in the bundle.***
📦 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 |
---|---|
Clean project | flutter clean |
Install packages | flutter pub get |
Build for iOS | flutter build ios |
Build for Android | flutter build apk |
Run on device | flutter run |
⚠️ 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.license
db.dat
- PKD Certificate (
.ldif
for Android,Certificates.bundle
for iOS)
Updated 3 months ago