Cordova

🌐 Cordova Setup

🛠 Prerequisites

Before integrating the SDK, make sure your development environment is set up.

Cordova v9.0.0+

  • Plugins:
    • RdnaIDVDocumentCapture
    • RdnaIDVSelfieCapture
    • RdnaIDVLocalization
  • Android SDK 23+, iOS 13+, physical devices required

Required Plugins

cordova plugin add ./RdnaIDVDocumentCapture
cordova plugin add ./RdnaIDVSelfieCapture
cordova plugin add ./RdnaIDVLocalization

Configuration

  • Cordova CLI v9.0.0+
  • Cordova plugins:
    • cordova-android ^8.1.0
    • cordova-ios ^6.1.0
  • Android:
    • Android Studio (latest), SDK 23+, Jetpack
  • iOS:
    • Xcode 13+
    • Platform: iOS 13+
    • CocoaPods required

🍏 Native iOS Setup

SDK Files

  • REL-ID Frameworks:
    • RELID_IDV_DOCUMENT_CAPTURE.zip
    • RELID_IDV_SELFIE_CAPTURE.zip
  • Required assets from Uniken:
    • regula.license
    • db.dat
    • Certificates.bundle

Configuration

  • Xcode 13+
  • Platform: platform :ios, '13.0'
  • CocoaPods required
  • Physical arm64 iOS device
  • Optional localization: IDVDocumentCapture.strings, IDVSelfieCapture.strings

🔧 Additional Configurations for Cordova (iOS & Android)

The following configurations are required to integrate the REL-ID IDV Document Capture Plugin in Cordova applications.


🍎 iOS Configuration

1. 📲 NFC Capability (Mandatory for iOS RFID document reading)

NFC is not auto-configured by the plugin. You must manually add NFC capabilities to your iOS project target.

Steps to enable NFC in Xcode:

  1. Open your project in Xcode.
  2. Select the target where NFC is needed.
  3. Go to Signing & Capabilities.
  4. Click + Capability.
  5. Add Near Field Communication Tag Reading.

📌 Without this, RFID-based document reading will not function.

📖 Apple NFC Capability Guide


2. 📁 Add Required Files

Ensure you have the following files from the UNIKEN team:

  • regula.license
  • db.dat
  • Certificates.bundle/icaopkd-002-complete-000310.ldif

Place these in the root directory of your Cordova project or parallel to the www folder.


3. 📝 Modify config.xml

Add the following entries to include the license, database, and certificate files in your iOS and Android builds.

<platform name="ios">
    <resource-file src="regula.license" />
    <resource-file src="db.dat" />
    <resource-file src="Certificates.bundle/icaopkd-002-complete-000310.ldif"
                   target="Certificates.bundle/icaopkd-002-complete-000310.ldif" />
</platform>

<platform name="android">
    <resource-file src="regula.license"
                   target="app/src/main/res/raw/regula.license" />
    <resource-file src="db.dat"
                   target="app/src/main/assets/Regula/db.dat" />
    <resource-file src="Certificates.bundle/icaopkd-002-complete-000310.ldif"
                   target="app/src/main/assets/Regula/certificates/icaopkd-002-complete-000310.ldif" />
</platform>

🛠️ After adding the above, run the following:

cordova build

This will bundle all the required files into your iOS and Android apps correctly.


📦 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.
PlatformBuild CommandRun Command
iOScordova build ios --devicecordova run ios
Androidcordova build androidcordova run android

⚠️ 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)