language
property of AAILivenessViewController
was not working.When migrating from 3.0.x or later to this version, you need to:
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
Then run pod install
.
PARAMETER_ERROR
potentially occurring under some specific conditions.AAILiveness
to AAILivenessUI
.FACE_MISSING
and MUTI_FACE
error codes.Upgraded the AAINetwork
module to version 1.0.3
.
Updated the AAILivenessViewController
class to enhance some UI details.
AAIHUD
to AAILoadingHud
._backBtn
and _wrapView
's frame to auto layout.leftBarButtonItem
when the navigation bar is visible.Changed AAIImgs's bundle format from AAIImgs.bundle
to AAIImgs.xcassets
.
Now AAILivenessUI
module support pod static linking. See the static link for more detail.
Support customize localizable strings by provide a AAILivensss.strings
resource file. See the FAQ for more detail.
Add the following delegate methods to the AAILivenessWrapDelegate
protocol:
- (void)onBeforeStartDetection;
- (void)onOriginalFrameReceived:(AAILivenessFrame * _Nonnull)frame;
Update class AAILivenessViewController
, and add the following methods to AAILivenessViewController.h
:
- (void)beforeStartDetection;
- (void)didReceivedOriginFrame:(AAILivenessFrame *)originFrame;
- (void)didStopDetection;
Add the property hudBrandColor
to the AAILivenessViewController
class to customize the color of the loading view(AAILoadingHud
). The default color is 0x5BC413
.
When migrating from 3.0.x or later to this version, you need to:
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
Then run pod install
.
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;
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:
When migrating from 3.0.5 or later to this version, you need to:
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
Then run pod install
.
Fix insert nil exception issue:
Fatal Exception: NSInvalidArgumentException
***
__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempot to insert nil object from objects[0]
When migrating from 3.0.5 or later to this version, you need to:
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
Then run pod install
.
Video recording feature optimization:
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.
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];
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);
}
}
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;
When migrating from 3.0.5 or later to this version, you need to:
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
Then run pod install
.
detectionFailedBlk
callback may not be called if a network error occurred while initializing the SDK using an accessKey and secretKey.When migrating from 3.0.5 or later to this version, you need to:
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
Then run pod install
.
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
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;
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];
When migrating from 3.0.5 or later to this version, you need to:
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
Then run pod install
.
Improved stability and fixed memory leak bug.
Updated class AAILivenessViewController
and ajust the ellipse size to enhance the user experience.
Support market AAILivenessMarketBPS
.
Support return the AAILivenessImageData
sequence list by calling the following method:
NSArray<AAILivenessImageData *> *imageDataSequenceList = [livenessResult imageDataSequenceList];
When migrating from 3.0.5 to this version, you need to:
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
Then run pod install
.
Fix the blank page issue on some devices.
Add 'DEVICE_NOT_SUPPORT' error code for AAILivenessFailedResult
.
Support certificate pinning.
Upgrade AAINetwork
to v1.0.2.
When migrating from 3.0.x to this version, you need to:
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
Then run pod install
.
Breaking changes:
imageSequenceList
method in the AAILivenessResult
class has been marked as unavailable. Please use [result getImgBase64Str]
and [result getNearBase64Str]
methods to compose the image sequence.Other update:
Fixed motion sensor value bug in event tracking logs.
Fix the spelling issue in the Thai translation for the localized key 'move_center'.
Migrate the prepare timer logic from AAILivenessViewController.m
to SDK internal.
When migrating from 3.0.x to this version, you need to:
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
Then run pod install
.
Improve captured image quality.
When migrating from 3.0.x to this version, you need to:
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
Then run pod install
.
Fixed the bugs related to the ineffective retry button on the default result page.
Fixed the bugs related to incorrect failure reason in event tracking logs.
When migrating from 3.0.x to this version, you need to:
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
Then run pod install
.
The property configAvatarPreviewPath
and configAvatarPreviewPathV2
of AAILivenessViewController
are no longer supported.
From version 3.0.0, motion detection has been removed, so the properties and methods related to motion detection will not have any effect.
When migrating from 2.0.7 to this version, you need to:
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
Then run pod install
.