Documentation

Release Notes

v3.6.1 (2025.04.27) Download

Fixed

  1. Fix potential crash issue during JSON serialization in certain edge cases.

Migration Guides

  • When migrating from 3.0.x or later to this version, you need to:
    1. Change the download link of module AAILivenessUI and AAINetwork to the following value:
      pod 'AAILivenessUI', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.6.1/iOS-Liveness-SDK-V3.6.1.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.3.tar.bz2', type: :tbz
    2. Then run pod install.

v3.6.0 (2025.04.02) Download

New Feature

  • Support configure a signatureId for liveness detection.

    AAIAdditionalConfig *additionalConfig = [AAILivenessSDK additionalConfig];
    // Other  configurations...
    ...
    // An optional string value used to conveniently query liveness detection results.
    // Call the `/liveness/generate-signature-id` API to generate this value, then assign 
    // it to this field before starting a new liveness flow.
    //
    // ‼️The value must be unique per liveness flow. Passing a previously used value will
    // result in a parameter error in SDK. The SDK will automatically reset this field to 
    // nil after it is used.
    additionalConfig.signatureId = @"your-unique-signatureId";

Migration Guides

  • When migrating from 3.0.x or later to this version, you need to:
    1. Change the download link of module AAILivenessUI and AAINetwork to the following value:
      pod 'AAILivenessUI', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.6.0/iOS-Liveness-SDK-V3.6.0.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.3.tar.bz2', type: :tbz
    2. Then run pod install.

v3.5.0 (2024.12.24) Download

Update

  1. Update PrivacyInfo.xcprivacy file.
  2. NSMotionUsageDescription no longer required.

Enhancement

  1. Enhance SDK security.

Migration Guides

  • When migrating from 3.0.x or later to this version, you need to:
    1. Change the download link of module AAILivenessUI and AAINetwork to the following value:
      pod 'AAILivenessUI', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.5.0/iOS-Liveness-SDK-V3.5.0.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.3.tar.bz2', type: :tbz
    2. Then run pod install.

v3.4.1 (2024.11.13) Download

Fixed

  1. Fixed the issue where the language property of AAILivenessViewController was not working.

Migration Guides

  • When migrating from 3.0.x or later to this version, you need to:
    1. Change the download link of module AAILivenessUI and AAINetwork to the following value:
      pod 'AAILivenessUI', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.4.1/iOS-Liveness-SDK-V3.4.1.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.3.tar.bz2', type: :tbz
    2. Then run pod install.

v3.4.0 (2024.9.09) Download

Fixed

  1. Fixed the issue of PARAMETER_ERROR potentially occurring under some specific conditions.

Breaking Changes

  1. Renamed the pod module AAILiveness to AAILivenessUI.
  2. Minimum iOS version from 9.0 to iOS 10.0.

Enhancement

  • Adjusted UI interactions and prompts to enhance the user experience.
  • Optimized the performance of the liveness near image collection process by providing appropriate prompts when no face or multiple faces are detected, resulting in customers no longer receiving FACE_MISSING and MUTI_FACE error codes.
  • Improved the speed of the liveness collection process by eliminating the 3-second wait time and reducing image upload duration.

Update

  1. Upgraded the AAINetwork module to version 1.0.3.
  2. Updated the AAILivenessViewController class to enhance some UI details.
    • Changed the default loadingView from AAIHUD to AAILoadingHud.
    • Migrated the _backBtn and _wrapView's frame to auto layout.
    • Automatically added a leftBarButtonItem when the navigation bar is visible.
  3. Changed AAIImgs's bundle format from AAIImgs.bundle to AAIImgs.xcassets.
  4. Now AAILivenessUI module support pod static linking. See the static link for more detail.

New Features

  1. Support customize localizable strings by provide a AAILivensss.strings resource file. See the FAQ for more detail.
  2. Add the following delegate methods to the AAILivenessWrapDelegate protocol:
    - (void)onBeforeStartDetection;
    - (void)onOriginalFrameReceived:(AAILivenessFrame * _Nonnull)frame;
  3. Update class AAILivenessViewController, and add the following methods to AAILivenessViewController.h:
    - (void)beforeStartDetection;
    - (void)didReceivedOriginFrame:(AAILivenessFrame *)originFrame;
    - (void)didStopDetection;
  4. Add the property hudBrandColor to the AAILivenessViewController class to customize the color of the loading view(AAILoadingHud). The default color is 0x5BC413.

Migration Guides

  • When migrating from 3.0.x or later to this version, you need to:
    1. Rename pod name AAILiveness to AAILivenessUI, change the download link of module AAILivenessUI and AAINetwork to the following value:
      pod 'AAILivenessUI', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.4.0/iOS-Liveness-SDK-V3.4.0.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.3.tar.bz2', type: :tbz 
    2. Then run pod install.

v3.3.0 (2024.6.30) Download

New Feature

  • Support customers to intercept an audit image at a specified time:

    AAIAdditionalConfig *additionalConfig = [AAILivenessSDK additionalConfig];
    // Other audit image configurations...
    ...
    // Capture an audit image after 5 seconds from the camera launched.
    additionalConfig.relativeSecondsCaptureAfterCameraLaunched = 5; 

Enhancement

  • Optimize face occlusion model for real person misrecognition issue.

  • Optimize frontend passrate.

  • Enhanced Security Against Hook Injection Attacks:strengthened our defenses against hook injection attacks by implementing watermarking and additional environment checks. These measures provide an extra layer of security to protect against fraudulent activities.

  • UI Interaction Adjustment.
    Currently, the 3D liveness detection process uses the same color for the ellipse throughout the entire process. We have made adjustments to the detection status, keeping the ellipse green(#0x5BC413) in a stationary state and gray(#F5F5F5) in other states.
    If you wish to maintain the previous interaction effect, you can call the following codes:

    AAIAdditionalConfig *additionalConfig = [AAILivenessSDK additionalConfig];
    // Other configurations...
    ...
    // The highlight color of the ellipse border in 3D mode(near/distant mode). Default is 0x5BC413.
    additionalConfig.ellipseBorderCol3D = [UIColor colorWithRed:(0x5B/255.0) green:(0xC4/255.0) blue:(0x13/255.0) alpha:1];
    
    // The normal color of the ellipse border in 3D mode(near/distant mode). Default is 0xF5F5F5.
    additionalConfig.normalEllipseBorderCol3D = [UIColor colorWithRed:(0x5B/255.0) green:(0xC4/255.0) blue:(0x13/255.0) alpha:1];

    UI presentation effect:

Migration Guides

  • When migrating from 3.0.5 or later to this version, you need to:
    1. Change the download link of module AAILiveness and AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.3.0/iOS-Liveness-SDK-V3.3.0.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.2-PrivacyInfo.tar.bz2', type: :tbz 
    2. Then run pod install.

v3.1.3 (2024.6.17) Download

Fixed

  • Fix insert nil exception issue:
    Fatal Exception: NSInvalidArgumentException
     ***
     __NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempot to insert nil object from objects[0]

Update

  • Add PrivacyInfo.xcprivacy.
  • Optimize upload image speed. (This feature is disabled by default. To enable it, please contact us.)

Migration Guides

  • When migrating from 3.0.5 or later to this version, you need to:
    1. Change the download link of module AAILiveness and AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.1.3/iOS-Liveness-SDK-V3.1.3.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.2-PrivacyInfo.tar.bz2', type: :tbz 
    2. Then run pod install.

v3.1.2 (2024.1.23) Download

Fixed

  • Fix an issue that camera may hang when you enable the audit image data list feature and in some critical situations.

Update

  • Video recording feature optimization:
    1. Significant reduction in video size.
    2. Improved compatibility.
    3. Enhanced video smoothness.
    4. Fixed video size to 300px*300px.

About video recording feature.

By enabling this feature, the SDK will activate video recording. After the completion of the liveness process, you can retrieve the video file using SDK methods. The video file format is .mp4. Please note that this video can only be obtained through the SDK and cannot be obtained from the backend. After using the video, it is up to you to decide whether to delete the local file.

  1. Enable video recording:
    AAIVideoConfig *vConfig = [AAIVideoConfig defaultConfig];
    vConfig.maxRecordDuration = 60; // Maximum recording duration, in seconds, valid range [2,60], default is 60 seconds.
    [AAILivenessSDK configVideo:vConfig];
  2. Get video file:
    // Note that the "syncGetLatestVideoRecordResult" method can be called only if video recording is enabled
    AAIVideoConfig *originVConfig = [AAILivenessSDK videoConfig];
    if (originVConfig != nil && originVConfig.recordStage != AAIVideoRecordStageUnspecified) {
       AAIVideoRecordResult *videoResult = [AAILivenessSDK syncGetLatestVideoRecordResult];
       if (videoResult != nil && videoResult.code != AAIVideoRecordResultCodeFailed) {
          NSLog(@"Video path is : %@", videoResult.videoPath);
       }
    }

New Features

  • Support configure the audit image quality. Note that a smaller quality will result in a smaller image size which will reduce the upload time.

    // Other optional audit image configurations
    ...
    
    // (Optional) The audit image quality, default is 30. Available values in range [30, 100].
    additionalConfig.auditImageQuality = 30;
    

Migration Guides

  • When migrating from 3.0.5 or later to this version, you need to:
    1. Change the download link of module AAILiveness and AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.1.2/iOS-Liveness-SDK-V3.1.2.tar.bz2' , type: :tbz
    2. Then run pod install.

v3.1.1 (2023.12.26) Download

Fixed

  • Fixed an issue where the detectionFailedBlk callback may not be called if a network error occurred while initializing the SDK using an accessKey and secretKey.

Migration Guides

  • When migrating from 3.0.5 or later to this version, you need to:
    1. Change the download link of module AAILiveness and AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.1.1/iOS-Liveness-SDK-V3.1.1.tar.bz2' , type: :tbz
    2. Then run pod install.

v3.1.0 (2023.12.15) Download

New Features

  • Add blink detection feature.

  • Support return the audit image sequence list. If you enable this feature, the SDK will automatically upload the audit image sequence list to the server after liveness detection complete.

    How to use

    1. First enable the audit image data list feature before present the SDK page.

      // Initialize the SDK
      ...
      
      // Enable the audit image data list feature.
      //
      // Currently, the SDK collects audit images at a constant interval.
      // Since the detection duration is not guaranteed and depends on user actions,
      // the number of audit images is not fixed.
      // To manage memory and bandwidth usage, the SDK limits the maximum number of audit images in the data list to 20.
      // If the number of audit images exceeds 20, the SDK will stop collecting them.
      
      AAIAdditionalConfig *additionalConfig = [AAILivenessSDK additionalConfig];
      additionalConfig.enableCollectAuditImages = YES;
      
      // The following properties are optional, you can set them according to your needs.
      
      // (Optional) The max number of audit image data list, default is 20.
      additionalConfig.auditImageMaxNumber = 20;
      
      // (Optional) The capture interval of audit image data, unit is millisecond, default is 400ms.
      // Note that a smaller interval will result in collecting more audit image data,
      // which will increase memory usage and extend the upload time.
      additionalConfig.auditImageCaptureInterval = 400;
      
      // (Optional) The audit image width, default is 300. Available values in range [50, 1000].
      additionalConfig.auditImageWidth = 300;
      
    2. Then obtain the audit image data list after liveness detection complete. There are two ways to obtain the audit image data list:

      • One way is to get it from the AAILivenessResult object.

        NSArray<AAILivenessImageData *> *auditImageDataSequenceList = [livenessResult auditImageDataList];
      • Another way is to parse the auditImageUrl fileld in the liveness-detection openapi response, which is a download link for a zip file. See liveness-detection openapi for more detail.

  • Add eventId for AAILivenessResult and AAILivenessFailedResult to track the whole liveness detection process and debug. Please make sure to save this ID for contacting us for troubleshooting purposes.

    // Get the eventId from the result object.
    NSString *eventId = [livenessResult eventId];

Migration Guides

  • When migrating from 3.0.5 or later to this version, you need to:
    1. Change the download link of module AAILiveness and AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.1.0/iOS-Liveness-SDK-V3.1.0.tar.bz2' , type: :tbz
    2. Then run pod install.

v3.0.7 (2023.12.07) Download

  1. Improved stability and fixed memory leak bug.
  2. Updated class AAILivenessViewController and ajust the ellipse size to enhance the user experience.
  3. Support market AAILivenessMarketBPS.
  4. Support return the AAILivenessImageData sequence list by calling the following method:
    NSArray<AAILivenessImageData *> *imageDataSequenceList = [livenessResult imageDataSequenceList];
  5. When migrating from 3.0.5 to this version, you need to:
    1. Change the download link of module AAILiveness and AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.0.7/iOS-Liveness-SDK-V3.0.7.tar.bz2' , type: :tbz
    2. Then run pod install.

v3.0.5 (2023.10.12) Download

  1. Fix the blank page issue on some devices.
  2. Add 'DEVICE_NOT_SUPPORT' error code for AAILivenessFailedResult.
  3. Support certificate pinning.
  4. Upgrade AAINetwork to v1.0.2.
  5. When migrating from 3.0.x to this version, you need to:
    1. Change the download link of module AAILiveness and AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.0.5/iOS-Liveness-SDK-V3.0.5.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.2.tar.bz2', type: :tbz 
    2. Then run pod install.

v3.0.4 (2023.9.05) Download

  1. Breaking changes:
    1. The imageSequenceList method in the AAILivenessResult class has been marked as unavailable. Please use [result getImgBase64Str] and [result getNearBase64Str] methods to compose the image sequence.
  2. Other update:
    1. Fixed motion sensor value bug in event tracking logs.
    2. Fix the spelling issue in the Thai translation for the localized key 'move_center'.
    3. Migrate the prepare timer logic from AAILivenessViewController.m to SDK internal.
    4. When migrating from 3.0.x to this version, you need to:
      1. Change the download link of module AAILiveness to the following value:
        pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.0.4/iOS-Liveness-SDK-V3.0.4.tar.bz2' , type: :tbz
      2. Then run pod install.

v3.0.3 (2023.7.26) Download

  1. Improve captured image quality.
  2. When migrating from 3.0.x to this version, you need to:
    1. Change the download link of module AAILiveness to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.0.3/iOS-Liveness-SDK-V3.0.3.tar.bz2' , type: :tbz
    2. Then run pod install.

v3.0.2 (2023.7.20) Download

  1. Fixed the bugs related to the ineffective retry button on the default result page.
  2. Fixed the bugs related to incorrect failure reason in event tracking logs.
  3. When migrating from 3.0.x to this version, you need to:
    1. Change the download link of module AAILiveness to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.0.2/iOS-Liveness-SDK-V3.0.2.tar.bz2' , type: :tbz
    2. Then run pod install.

v3.0.0 (2023.7.10) Download

  1. The property configAvatarPreviewPath and configAvatarPreviewPathV2 of AAILivenessViewController are no longer supported.
  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.
  3. When migrating from 2.0.7 to this version, you need to:
    1. Change the download link of module AAILiveness, AAINetwork to the following value:
      pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.0.0/iOS-Liveness-SDK-V3.0.0.tar.bz2' , type: :tbz
      pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.1.tar.bz2', type: :tbz 
    2. Then run pod install.

For 2D liveness detection change logs and release history, see here