Migration Guides (React Native)

From 4.0.0, we've introduced significant API improvements and feature enhancements. To make upgrading easier, here’s what you need to know:

Dependency Method

Previously, the module was used by importing the source code. Now, it has been changed to depend on the NPM repository, and we unified the RN plugin's public API. Please re-integrate by referring to the latest documentation. Available configuration options are now defined by the newest plugin version. If you need additional settings, contact us.

Add the dependency in package.json:

For Android, you need to do:

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

  2. You need to remove the liveness-plugin module, and no longer manually add the package in the Application:

API Changes

For Android side, from 4.0.0 some APIs in the table below are now removed. You’ll need to update your code accordingly.

Method/PropertyAlternativeNotes
setActionSequence-No need to call.
setDetectionLevel-No need to call.
setVideoConfig-No need to call.
setAuditConfig-No need to call.
setDetectOcclusion-No need to call.
set3DLivenessTimeoutMills-No need to call.
setActionTimeoutMills-No need to call.
setResultPictureSize-No need to call.
bindUser-No need to call.
setSignatureId-No need to call.

For iOS side,since we've unified the RN plugin's public API, all pre-4.0.0 RN public APIs are no longer supported. Please follow the latest plugin's public API as your reference.

The recommended alternative for the deprecated API is as follows:


For detailed integration instructions, please refer to the integration documentation.