Integration (React Native)

Integration Documentation for React Native Compatible with Liveness Detection V4.x Version.

Overview-Android

Overview-iOS

SDK requirements and limitations as below:

Compliance Explanation

Click to view the compliance explanation

Release Notes

Click to show release notes

Demo

Install IDV-Demo.apk to your phone and log in with the test account.

Migration Guides

If you are upgrading from an older version of the Liveness SDK, please refer to this document to understand the changes.

Installation

Add the dependency in your React Native project’s package.json file.

For Android, you need to do:

Add the Maven repository to the settings.gradle or build.gradle file in the Android directory of your React Native project:

For iOS, you need to do:

  1. specify the SDK name and url in the Podfile.
  1. Run pod install to install the dependencies in your project.
  2. Add camera usage description in Info.plist as bellow. Ignore this step if you have added those.

Usage

  1. Initialization SDK.

  2. Check license

    The license is obtained by your server calling our openAPI, you need to check license before starting the liveness detection activity.

The returned values of checkResult:

APPLICATION_ID_NOT_MATCH: The package name is not within the authorized scope, please check your package name.

LICENSE_EXPIRE: The license has expired, please confirm that the user has calibrated the phone time.

ERROR_LICENSE(1): The license parsing succeeded, but necessary authentication information is missing, this case generally will not occur.

ERROR_LICENSE(2): The license parsing succeeded, but the internal format is incorrect, this case also generally will not occur.

ERROR_LICENSE(3): It is highly likely that an incompatible SDK license is being used, such as using an IQA license for liveness detection.

ERROR_LICENSE(4, 5): Parsing failed, please check if the license has issues like mismatched quotes, line breaks, etc.

Error Code

See Error Code