Cordova aai-ios-liveness-detection-plugin(v3.4.1)

Migration Guides

  1. From version 3.1.3, the method onLivenessViewRequestFailed have been removed, and the parameter errorCode(old version called 'key') of onDetectionFailed has been changed, please refer to the v3.1.3 change logs for details.

Download SDK

See this part to get SDK download link.

Installation

  1. Add local plugin to your project:

    If you get error like "CordovaError: Could not determine package name from output", try using a lower version of npm(e.g. nvm install 14.19.0).

  2. Add camera and motion sensor (gyroscope) usage description in Info.plist as bellow. Ignore this step if you have added those.

Usage

Error code

The errorCode values of onDetectionFailed are as follows:

errorCoderaw native sdk codeDescription
PREPARE_TIMEOUTfail_reason_prepare_timeoutTimeout during the preparation stage
ACTION_TIMEOUTfail_reason_timeoutTimeout during the motion stage
MUTI_FACEfail_reason_muti_faceMultiple faces detected during the motion stage
FACE_MISSINGfail_reason_facemiss_blink_mouthFace is missing during the motion stage(blink or open mouth)
FACE_MISSINGfail_reason_facemiss_pos_yawFace is missing during the motion stage(pos yaw)
MUCH_ACTIONfail_reason_much_actionMultiple motions detected during the motion stage
USER_GIVE_UPuser_give_upThe user clicked the top left back button during the detection process
NO_RESPONSE Network request failed
DEVICE_NOT_SUPPORTdevice_not_supportThe front camera of this device cannot be opened
UNDEFINED Other undefined errors
...(Other server side error codes)  

Change logs and release history

v3.4.1 Download

Update
  1. Sync native SDK.

v3.4.0 Download

Update
  1. Sync native SDK.
  2. Add setHudBrandColor method, which is used to set the color of AAILoadingHud. The default is #5BC413.

v3.3.0 Download

Update
  1. Sync native SDK.
New Features
  1. Added setNormalEllipseBorderCol3D method, which is used to set the normal color of the ellipse border in 3D mode(near/distant mode). The default is 0xF5F5F5. If you want to maintain the previous interaction effect, you can call the following codes:

v3.1.3 Download

Breaking Changes
  1. Remove the callback method onLivenessViewRequestFailed, please use onDetectionFailed to handle the user's give up action and network request failed.
  2. The errorCode of onDetectionFailed has been changed, please refer to the Error code for details.
New Features
  1. Added additionalInfo parameter to onDetectionFailed method, which contains the following keys:

    • "eventId": This is used to help debug the specific cause of the error.
    • "rawErrorCode": The native sdk side raw error code.
    • "transactionId": This is used to help debug the specific cause of the server side error.
  2. Added additionalInfo parameter to onDetectionComplete method, which contains the following keys:

    • "eventId": This is used to help debug the specific cause of the error.
    • "transactionId": This is used to help debug the specific cause of the server side error.
    • "videoFilePath": The video file path, if you enable the video recording feature, otherwise this key will not exist.
  3. Added recordUserGiveUp method, which is used to mark the action of tapping back button as "USER_GIVE_UP". The default is false. If you pass true, the onDetectionFailed will be called when the user taps the top left back button while liveneness detection is running.

  4. Added method setAuditImageConfig and setVideoRecorderConfig to support collecting audit images and recording video during the detection process.

Update
  1. Sync native SDK.

v3.1.2 Download

  1. Sync native SDK.

v3.1.1 Download

  1. Sync native SDK.

v3.1.0 Download

  1. Sync native SDK.

v3.0.7 Download

  1. Sync native SDK.
  2. Support market BPS.
  3. Add methods setEllipseBorderCol3D and setInnerEllipseLineCol3D.

v3.0.5 Download

  1. Sync native SDK.
  2. Upgrade AAINetwork module to 1.0.2.

v3.0.4 Download

  1. Sync native SDK.

v3.0.3 Download

  1. Sync native SDK.

v3.0.2 Download

  1. Sync native SDK.

v3.0.0 Download

  1. Sync native SDK.
  2. From version 3.0.0, motion detection has been removed, so the properties and methods related to motion detection will not have any effect.

v2.0.7 Download

  1. Sync native SDK.

v2.0.6 Download

  1. Sync native SDK.

v2.0.5 Download

  1. Sync native SDK.

v2.0.4 Download

  1. Sync native SDK.
  2. Add methods setPlayPromptAudio and setShowAnimationImgs.

v2.0.3 Download

  1. Sync native SDK.

v2.0.2 Download

  1. Sync native SDK.
  2. Add methods setDetectionLevel, setRoundBoderColor, setEllipseLineColor.

v1.3.4 Download

  1. Sync native SDK.

v1.3.3 Download

  1. Optimizing the capture of face image.
  2. Support closed eye detection.
  3. Add localized string "pls_open_eye".
  4. Fix EXC_BAD_ACCESS bug that could occur in some cases.
  5. Fix the global service bug.
  6. Compressed images of AAIImgs.bundle.

v1.2.9 Download

  1. Add methods setActionTimeoutInterval, setPrepareTimeoutInterval, setLanguage.
  2. Update Resource.

v1.2.8 Download

  1. Upgrade network module.
  2. Set the SDK view to be displayed in full screen.

v1.2.7 Download

  1. Updated license check feature.

v1.2.6 Download

  1. Set the width of the image output by the SDK from 300 to 600.

v1.2.5 Download

  1. Refacored AAILivenessViewController.
  2. Fix EXC_BAD_ACCESS bug that could occur in some cases.
  3. Add other market enum values.

v1.2.1 Download

  1. Fix the bug that img of AAILivenessResult may be nil when the onDetectionComplete: method is called.

v1.2.0 Download

  1. Support to initialize SDK with license.
  2. Support face occlusion detection(only in the preparation phase, not in the action detection phase), this feature is off by default, you can turn it on if needed.
  3. Support Mexico,Malaysia,Pakistan,Nigeria,Colombia.
  4. Added the AAIModel.bundle resource.