This is a cordova iOS plugin for Liveness SDK.
To add this plugin to your project, follow these steps:
- Open a command prompt or terminal window.
- Change directories to the root of your Cordova project.
- Run the following command to add the plugin to your Cordova project:
$ cordova plugin add <path to plugin folder>
- Run the following command to build your Cordova project:
$ cordova build
- Add
LicensingFramework.framework
andLivenessSDK.framework
in your Xcode project.
Call checkLiveness
method of plugin using following parameters
cordova.exec(success, null, "FaceoffLivenessPlugin", "checkLiveness", ["Base64 representation of Front cnic image", "Base64 representation of Back cnic image", true, true, true, true, true, 3]);
Data Type | Description |
---|---|
String | Base64 representation of Front cnic image |
String | Base64 representation of Back cnic image |
Bool | Set challenge to move face to right |
Bool | Set challenge to move face to left |
Bool | Set challenge to nod head |
Bool | Is face comparison required |
Bool | Is OCR required |
Int | Max number of challenges |
Response will be in the form of JSON string. Which contains faceImageData and json objects of OcrResponse, FaceComparisonResponse.
function success(result) {
print(result);
};