UniApp Installation



Requirements

  • iOS
    • Minimum deployment target: iOS 15.6 or higher.

Prerequisites

Before installing the IDWise Uni Plugin, ensure you have the following:

Required Tools

  • HBuilderX: Download from https://www.dcloud.io/hbuilderx.html
    • Use the App Development Edition
    • Version: 3.1.0 or higher
  • macOS: Required for iOS development
  • Xcode: Latest version recommended

Required Credentials

  • Client Key: Obtain from IDWise dashboard
  • Flow ID: Configure your verification flow in IDWise dashboard

iOS Installation

Step 1: Add the Plugin to Your Project

  1. Copy the idwise-uni-plugin folder to your project's nativeplugins directory:
    YourProject/
    ├── nativeplugins/
    │   └── idwise-uni-plugin/
    │       ├── ios/
    │       │   ├── IDWiseSDK.framework
    │       │   ├── ShieldPtr.framework
    │       │   ├── FingerprintPro.framework
    │       │   ├── IDWiseModule.h
    │       │   ├── IDWiseModule.m
    │       │   ├── IDWiseSDKBridge.swift
    │       │   ├── IDWisePluginProxy.h
    │       │   ├── IDWisePluginProxy.m
    │       │   ├── IDWiseUniPlugin-Bridging-Header.h
    │       │   ├── IDWiseUniPlugin.swiftmodule/
    │       │   └── libIDWiseUniPlugin.a
    │       └── package.json

Step 2: Configure manifest.json

Open your project's manifest.json file and add the following configurations:

2.1 Register the Module

In the app-plus section, add the module reference:

{
  "app-plus": {
    "modules": {
      "idwise-uni-plugin": {}
    }
  }
}

2.2 Configure Native Plugin

Add the native plugin configuration:

{
  "app-plus": {
    "nativePlugins": {
      "idwise-uni-plugin": {
        "__plugin_info__": {
          "name": "IDWise Uni Plugin",
          "description": "IDWise SDK native plugin for uni-app",
          "platforms": "iOS",
          "url": "",
          "android_package_name": "",
          "ios_bundle_id": "",
          "isCloud": false,
          "bought": -1,
          "pid": "",
          "parameters": {}
        }
      }
    }
  }
}

2.3 iOS Permissions

Add required iOS permissions in the app-plus.distribute.ios section:

{
  "app-plus": {
    "distribute": {
      "ios": {
        "privacyDescription": {
          "NSCameraUsageDescription": "Camera is required for document scanning and selfie verification",
          "NSLocationWhenInUseUsageDescription": "Location is used for fraud prevention and security",
          "NFCReaderUsageDescription": "NFC is required to read passport chip data for verification"
        }
      }
    }
  }
}

Step 3: Build Configuration

Ensure your project is set to portrait mode for optimal user experience:

{
  "app-plus": {
    "distribute": {
      "orientation": ["portrait-primary"]
    }
  }
}