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, and Certificates.bundle in Android and iOS asset directories as per your Flutter setup.

Configuration

  • Flutter 3.10.*, Dart 3.0.*, DevTools 2.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

  1. Get the regula.license file from the UNIKEN team.
  2. Copy the file to the following path:
    android/app/src/main/res/raw/
    📁

    Create the raw folder if it doesn’t exist.


3. REL-ID IDV Document Capture Plugin Database File

  1. Copy the db.dat file to:
    android/app/src/main/assets/Regula/
    📁

    Create the Regula folder inside assets if it doesn’t exist.


4. REL-ID IDV Document Capture Plugin PKD Certificate File

  1. Copy the PKD certificate files (*.ldif) to:
    android/app/src/main/assets/certificates/
    📁

    Create the certificates folder inside assets 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:

  1. Select the project file from the project navigator on the far left side of thewindow.
  2. Select the target name where you want to add the linker flag.
  3. Select "Build Settings" tab
  4. Choose "All" to show all Build Settings.
  5. Scroll down to the "Linking" section, and double-click to the right of where it says"Other Linker Flags".
  6. A box will appear, Click on the "+" button to add a new linker flag.
  7. 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


&#x20;&#x20;


* Request the `regula.license` file from the UNIKEN team.
* Copy the regula.license in the root directory of our xcode project where your
  &#x20;&#x20;
  \<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


&#x20;&#x20;


* 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


&#x20;&#x20;


* 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.
TaskCommand
Clean projectflutter clean
Install packagesflutter pub get
Build for iOSflutter build ios
Build for Androidflutter build apk
Run on deviceflutter 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)