SDK package trimming instructions

Updated at:

Financial-grade Real Person Authentication offers several product solutions, including the Financial-grade Real Person Authentication Solution, Financial-grade Multi-factor Intent Verification Solution, and Financial-grade Liveness Face Verification Solution. Choose the product solution that best fits your business needs. The Financial-grade Real Person Authentication SDK includes all feature modules by default and supports all product solutions. If your app is sensitive to package size, you can trim specific SDK modules before integration. This topic explains how to trim the Financial-grade Real Person Authentication SDK.

Android SDK

SDK module introduction

The Financial-grade Real Person Authentication Android SDK includes the following modules:

Module name

Description

Compiled size

Dual architecture

ARM64

ARMv7

aliyun-base-[version]-[timestamp].aar

Basic feature module.

2.65 MB

1.90 MB

1.69 MB

aliyun-facade-[version]-[timestamp].aar

Basic feature module.

aliyun-face-[version]-[timestamp].aar

Basic feature module.

aliyun-facequality-[version]-[timestamp].aar

Strict Face Quality Detection module.

This module is not included in the default package because it increases the SDK package size. To use this module, download the complete SDK from the link.

Note

When this module is enabled, the client prompts the user to retry detection if the face is occluded, for example, by a hat or a mask. This helps capture a higher-quality face image before authentication. The strict quality detection may decrease the face recognition success rate.

For the ID_PRO solution, set the AppQualityCheck parameter to Y when you call the InitFaceVerify-Initiate authentication request operation.

5.04 MB

3.68 MB

3.22 MB

aliyun-photinus-[version]-[timestamp].aar

Note

Starting with SDK 2.3.38, this module is merged into the aliyun-face module.

Colorful liveness detection module.

8.49 KB

aliyun-faceaudio-[version]-[timestamp].aar

Senior-friendly mode audio resources.

65.10 KB

aliyun-facelanguage-[version]-[timestamp].aar

Multi-language resources.

Note

Multi-language support applies only to text prompts on the face recognition page. Other pages are not supported.

18.0 KB

aliyun-ocr-[version]-[timestamp].aar

ID card OCR module.

211.92 KB

aliyun-nfc-[version]-[timestamp].aar

NFC authentication module.

2.84 MB

2.54 MB

2.05 MB

aliyun-wishverify-[version]-[timestamp].aar

Multi-factor intent authentication module.

427.05 KB

Android-AliyunFaceGuard-[version].aar

Device assistant module.

2.22 MB

1.28 MB

0.94 MB

APSecuritySDK-DeepSec-[version].[timestamp].jiagu.aar

Secures the authentication channel.

4.13 MB

2.24 MB

1.99 MB

aliyun-facebeauty-[version]-[timestamp].aar

Beauty filter module.

9.29 KB

Note
  • version is the SDK version, and timestamp is the timestamp when the SDK was generated. Refer to the downloaded SDK for actual values.

  • The package size may vary depending on the compilation environment. Refer to the actual compilation result.

Module trimming instructions

By default, the SDK downloaded from the development reference is a full-featured module that includes all product capabilities certified on the official website. During actual use, you can adjust the dependencies in build.gradle based on the following instructions and your actual business scenarios:

# Alibaba Cloud Real Person Authentication Service SDK AARs
implementation files('libs/aliyun-base-xxx.aar')
implementation files('libs/aliyun-facade-xxx.aar')
implementation files('libs/aliyun-face-xxx.aar')
implementation files('libs/aliyun-facequality-xxx.aar')
implementation files('libs/aliyun-photinus-xxx.aar')
implementation files('libs/aliyun-ocr-xxx.aar')
implementation files('libs/aliyun-nfc-xxx.aar')
implementation files('libs/aliyun-wishverify-xxx.aar') # compileSdkVersion must be 29 or later to use this module
implementation files('libs/aliyun-faceaudio-xxx.aar')
implementation files('libs/aliyun-facelanguage-xxx.aar')
implementation files('libs/Android-AliyunFaceGuard-xxx.aar')
implementation files('libs/APSecuritySDK-DeepSec-xxx.aar')

# Alibaba Cloud Real Person Authentication Service third-party dependencies
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okio:okio:1.14.0'
implementation 'com.alibaba:fastjson:1.2.83_noneautotype'

SDK package trimming instructions by solution

Financial-grade Real Person Authentication Solution

Module

Trimmable

Special notes

aliyun-base-[version]-[timestamp].aar

Required

None.

aliyun-facade-[version]-[timestamp].aar

Required

None.

aliyun-face-[version]-[timestamp].aar

Required

None.

aliyun-facequality-[version]-[timestamp].aar

Optional

Trimmable when strict face quality detection is not used.

aliyun-photinus-[version]-[timestamp].aar

Note

Starting with SDK 2.3.38, this module is merged into the aliyun-face module.

Optional

Trimmable when the Dazzle Liveness feature is not used.

aliyun-faceaudio-[version]-[timestamp].aar

Optional

Senior-friendly voice prompt resource module. Trimmable if your app does not require senior-friendly support.

aliyun-facelanguage-[version]-[timestamp].aar

Optional

Multi-language resources. Trimmable if your app does not require multi-language support.

aliyun-ocr-[version]-[timestamp].aar

Optional

Trimmable when ID card photo recognition is not used.

aliyun-nfc-[version]-[timestamp].aar

Optional

NFC authentication module. Trimmable.

aliyun-wishverify-[version]-[timestamp].aar

Optional

Multi-factor intent authentication module. Trimmable.

Android-AliyunFaceGuard-[version].aar

Required

Device assistant module that protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APSecuritySDK-DeepSec-[version].[timestamp].jiagu.aar

Required

Required module that ensures the security of the client-side authentication environment.

okhttp&okio

Required

Required module used for SDK network requests.

fastjson

Required

Required module used for SDK data parsing.

oss-android-sdk

Optional

Optional module used for uploading data to OSS. For SDK versions later than 2.2.7, this module does not need to be integrated.

aliyun-facebeauty-[version]-[timestamp].aar

Trimmable

Optional module that provides beauty filter during face preview.

Financial-grade Liveness Face Verification Solution

Module

Trimmable

Special notes

aliyun-base-[version]-[timestamp].aar

Required

None.

aliyun-facade-[version]-[timestamp].aar

Required

None.

aliyun-face-[version]-[timestamp].aar

Required

None.

aliyun-facequality-[version]-[timestamp].aar

Optional

Trimmable when strict face quality detection is not used.

aliyun-photinus-[version]-[timestamp].aar

Note

Starting with SDK 2.3.38, this module is merged into the aliyun-face module.

Optional

Trimmable when the Dazzle Liveness feature is not used.

aliyun-faceaudio-[version]-[timestamp].aar

Optional

Senior-friendly voice prompt resource module. Trimmable if your app does not require senior-friendly support.

aliyun-facelanguage-[version]-[timestamp].aar

Optional

Multi-language resources. Trimmable if your app does not require multi-language support.

aliyun-ocr-[version]-[timestamp].aar

Optional

Trimmable when ID card photo recognition is not used.

aliyun-nfc-[version]-[timestamp].aar

Optional

NFC authentication module. Trimmable.

aliyun-wishverify-[version]-[timestamp].aar

Optional

Multi-factor intent authentication module. Trimmable.

Android-AliyunFaceGuard-[version].aar

Required

Device assistant module that protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APSecuritySDK-DeepSec-[version].[timestamp].jiagu.aar

Required

Required module that ensures the security of the client-side authentication environment.

okhttp&okio

Required

Required module used for SDK network requests.

fastjson

Required

Required module used for SDK data parsing.

oss-android-sdk

Optional

Optional module used for uploading data to OSS. For SDK versions later than 2.2.7, this module does not need to be integrated.

aliyun-facebeauty-[version]-[timestamp].aar

Trimmable

Optional module that provides beauty filter during face preview.

Financial-grade Liveness Detection Solution

Module

Trimmable

Special notes

aliyun-base-[version]-[timestamp].aar

Required

None.

aliyun-facade-[version]-[timestamp].aar

Required

None.

aliyun-face-[version]-[timestamp].aar

Required

None.

aliyun-facequality-[version]-[timestamp].aar

Optional

Trimmable when strict face quality detection is not used.

aliyun-photinus-[version]-[timestamp].aar

Note

Starting with SDK 2.3.38, this module is merged into the aliyun-face module.

Optional

Trimmable when the Dazzle Liveness feature is not used.

aliyun-faceaudio-[version]-[timestamp].aar

Optional

Senior-friendly voice prompt resource module. Trimmable if your app does not require senior-friendly support.

aliyun-facelanguage-[version]-[timestamp].aar

Optional

Multi-language resources. Trimmable if your app does not require multi-language support.

aliyun-ocr-[version]-[timestamp].aar

Optional

Trimmable when ID card photo recognition is not used.

aliyun-nfc-[version]-[timestamp].aar

Optional

NFC authentication module. Trimmable.

aliyun-wishverify-[version]-[timestamp].aar

Optional

Multi-factor intent authentication module. Trimmable.

Android-AliyunFaceGuard-[version].aar

Required

Device assistant module that protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APSecuritySDK-DeepSec-[version].[timestamp].jiagu.aar

Required

Required module that ensures the security of the client-side authentication environment.

okhttp&okio

Required

Required module used for SDK network requests.

fastjson

Required

Required module used for SDK data parsing.

oss-android-sdk

Optional

Optional module used for uploading data to OSS. For SDK versions later than 2.2.7, this module does not need to be integrated.

aliyun-facebeauty-[version]-[timestamp].aar

Trimmable

Optional module that provides beauty filter during face preview.

Financial-grade Multi-factor Intent Authentication Solution

Module

Trimmable

Special notes

aliyun-base-[version]-[timestamp].aar

Required

None.

aliyun-facade-[version]-[timestamp].aar

Required

None.

aliyun-face-[version]-[timestamp].aar

Required

None.

aliyun-facequality-[version]-[timestamp].aar

Optional

Trimmable when strict face quality detection is not used.

aliyun-photinus-[version]-[timestamp].aar

Note

Starting with SDK 2.3.38, this module is merged into the aliyun-face module.

Optional

Dazzle Liveness feature module. Trimmable.

aliyun-faceaudio-[version]-[timestamp].aar

Optional

Senior-friendly voice prompt resource module. Trimmable.

aliyun-facelanguage-[version]-[timestamp].aar

Optional

Multi-language resources. Trimmable if your app does not require multi-language support.

aliyun-ocr-[version]-[timestamp].aar

Optional

Trimmable when ID card photo recognition is not used.

aliyun-nfc-[version]-[timestamp].aar

Optional

NFC authentication module. Trimmable.

aliyun-wishverify-[version]-[timestamp].aar

Required

Required module for multi-factor intent authentication.

Android-AliyunFaceGuard-[version].aar

Required

The Device Assistant module protects the client-side authentication environment during face verification.

Note

If your business has strict limitations on package size, you can consider trimming this module. Trimming this module weakens security protection and prevents the use of the Device Assistant value-added service.

APSecuritySDK-DeepSec-[version].[timestamp].jiagu.aar

Required

Ensures the security of the client-side authentication environment.

okhttp&okio

Required

Required module used for SDK network requests.

fastjson

Required

Required module used for SDK data parsing.

oss-android-sdk

Optional

The SDK uses this module for data upload to OSS. This module is not required for SDK versions later than 2.2.7.

aliyun-facebeauty-[version]-[timestamp].aar

Trimmable

Optional module that provides beauty filter during face preview.

Financial-grade NFC Authentication Solution

Module

Trimmable

Special notes

aliyun-base-[version]-[timestamp].aar

Required

None.

aliyun-facade-[version]-[timestamp].aar

Required

None.

aliyun-face-[version]-[timestamp].aar

Optional

Provides basic liveness detection.

aliyun-facequality-[version]-[timestamp].aar

Optional

Provides strict face quality detection.

aliyun-photinus-[version]-[timestamp].aar

Note

Starting with SDK 2.3.38, this module is merged into the aliyun-face module.

Optional

Provides the Dazzle Liveness feature.

aliyun-faceaudio-[version]-[timestamp].aar

Optional

Provides senior-friendly voice prompts.

aliyun-facelanguage-[version]-[timestamp].aar

Optional

Provides multi-language resources.

aliyun-ocr-[version]-[timestamp].aar

Optional

Provides document OCR recognition.

aliyun-nfc-[version]-[timestamp].aar

Required

The core module for NFC authentication.

aliyun-wishverify-[version]-[timestamp].aar

Optional

Provides multi-factor intention authentication.

Android-AliyunFaceGuard-[version].aar

Required

The Device Assistant module protects the client-side authentication environment during face verification.

Note

If your business has strict limitations on package size, you can consider trimming this module. Trimming this module weakens security protection and does not support the Device Assistant value-added service.

APSecuritySDK-DeepSec-[version].[timestamp].jiagu.aar

Required

Ensures the security of the client-side authentication environment.

okhttp&okio

Required

The SDK uses this module for network requests.

fastjson

Required

The SDK uses this module for data parsing.

oss-android-sdk

Optional

The SDK uses this module for data upload to OSS.

aliyun-facebeauty-[version]-[timestamp].aar

Trimmable

Optional module that provides beauty filter during face preview.

Compile-time trimming

To further reduce the SDK package size, you can modify the build script to remove the toyger.face.dat and toyger.quality.dat face model files. These files are in the Assets directories of the aliyun-face and aliyun-facequality modules, respectively. You can then download them on-demand at runtime to ensure authentication works properly.

android {
    ...
        android.applicationVariants.all { variant ->
            variant.mergeAssets.doLast {
                delete(fileTree(dir: variant.mergeAssets.outputDir, includes: ['toyger.face.dat', 'toyger.quality.dat']))
            }
        }
}

iOS SDK

SDK modules

The Financial-grade Real-Person Authentication iOS SDK modules are as follows:

Module name

Description

Post-compile size increase

AliyunFaceAuthFacade.framework

Face verification feature module.

1451K

ToygerService.framework

DTFIdentityManager.framework

ToygerNative.framework

BioAuthEngine.framework

DTFUtility.framework

VerifyNativeAbility.framework

APBToygerFacade.framework

OCRDetectSDKForTech.framework

OCR recognition module.

219K

DTFNFCIdentityManager.framework

NFC authentication module.

274K

MultiFactorFacade.framework

Multi-factor intent authentication module.

480K

AliyunDevicePKG.framework

Device Assistant module.

723K

APPSecuritySDK.framework

Authentication security link protection module.

1067K

DTFBeauty.framework

Beauty filter module.

5k

Module trimming instructions

By default, the SDK downloaded from Development Reference is a full-featured module that includes all product capabilities on the official website. You can trim the SDK according to the following instructions based on your actual business scenarios.

Financial-grade Real Person Authentication Solution

Module name

Trimmable

Special notes

AliyunFaceAuthFacade.framework

Required

Required module, basic feature module.

ToygerService.framework

Required

Required module. If you are sensitive to package size, you can remove the ToygerService.bundle file during integration.

DTFIdentityManager.framework

Required

None.

ToygerNative.framework

Required

None.

BioAuthEngine.framework

Required

None.

DTFUtility.framework

Required

None.

VerifyNativeAbility.framework

Required

Required module, basic feature module.

APBToygerFacade.framework

Required

Required module. If you do not need senior-friendly mode, you can remove the APBToygerFacadeSuitable.bundle file.

If you do not need multi-language support, you can remove the multi-language files (en.strings, id.strings, ja.strings, ko.strings, zh-HK.strings, zh-Hant.strings).

OCRDetectSDKForTech.framework

Trimmable

Trimmable when ID card photo recognition is not used.

DTFNFCIdentityManager.framework

Trimmable

NFC authentication module. Trimmable.

MultiFactorFacade.framework

Trimmable

Intent authentication module. Trimmable.

AliyunDevicePKG.framework

Required

Device Assistant module, protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APPSecuritySDK.framework

Required

Authentication security link protection module. Strongly recommended for integration.

Note

If this module is trimmed from the SDK, IDFA is not collected, which may also increase security risks.

DTFBeauty.framework

Trimmable

Optional module, beauty filter feature during face preview.

Financial-grade Liveness Face Verification Solution

Module name

Trimmable

Special notes

AliyunFaceAuthFacade.framework

Required

None.

ToygerService.framework

Required

Required module. If you are sensitive to package size, you can remove the ToygerService.bundle file during integration.

DTFIdentityManager.framework

Required

None.

ToygerNative.framework

Required

None.

BioAuthEngine.framework

Required

None.

DTFUtility.framework

Required

None.

VerifyNativeAbility.framework

Required

Required module, basic feature module.

APBToygerFacade.framework

Required

Required module. If you do not need senior-friendly mode, you can remove the APBToygerFacadeSuitable.bundle file.

If you do not need multi-language support, you can remove the multi-language files (en.strings, id.strings, ja.strings, ko.strings, zh-HK.strings, zh-Hant.strings).

OCRDetectSDKForTech.framework

Trimmable

ID card photo recognition module. Trimmable.

DTFNFCIdentityManager.framework

Trimmable

NFC authentication module. Trimmable.

MultiFactorFacade.framework

Trimmable

Intent authentication module. Trimmable.

AliyunDevicePKG.framework

Required

Device Assistant module, protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APPSecuritySDK.framework

Required

Authentication security link protection module. Strongly recommended for integration.

Note

If this module is trimmed from the SDK, IDFA is not collected, which may also increase security risks.

DTFBeauty.framework

Trimmable

Optional module, beauty filter feature during face preview.

Financial-grade Liveness Detection Solution

Module name

Trimmable

Special notes

AliyunFaceAuthFacade.framework

Required

None.

ToygerService.framework

Required

Required module. If you are sensitive to package size, you can remove the ToygerService.bundle file during integration.

DTFIdentityManager.framework

Required

None.

ToygerNative.framework

Required

None.

BioAuthEngine.framework

Required

None.

DTFUtility.framework

Required

None.

VerifyNativeAbility.framework

Required

Required module, basic feature module.

APBToygerFacade.framework

Required

Required module. If you do not need senior-friendly mode, you can remove the APBToygerFacadeSuitable.bundle file.

If you do not need multi-language support, you can remove the multi-language files (en.strings, id.strings, ja.strings, ko.strings, zh-HK.strings, zh-Hant.strings).

OCRDetectSDKForTech.framework

Trimmable

ID card photo recognition module. Trimmable.

DTFNFCIdentityManager.framework

Trimmable

NFC authentication module. Trimmable.

MultiFactorFacade.framework

Trimmable

Intent authentication module. Trimmable.

AliyunDevicePKG.framework

Required

Device Assistant module, protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APPSecuritySDK.framework

Required

Authentication security link protection module. Strongly recommended for integration.

Note

If this module is trimmed from the SDK, IDFA is not collected, which may also increase security risks.

DTFBeauty.framework

Trimmable

Optional module, beauty filter feature during face preview.

Financial-grade Multi-factor Intent Authentication Solution

Module name

Trimmable

Special notes

AliyunFaceAuthFacade.framework

Required

None.

ToygerService.framework

Required

Required module. If you are sensitive to package size, you can remove the ToygerService.bundle file during integration.

DTFIdentityManager.framework

Required

None.

ToygerNative.framework

Required

None.

BioAuthEngine.framework

Required

None.

DTFUtility.framework

Required

None.

VerifyNativeAbility.framework

Required

Required module, basic feature module.

APBToygerFacade.framework

Required

Required module. If you do not need senior-friendly mode, you can remove the APBToygerFacadeSuitable.bundle file.

If you do not need multi-language support, you can remove the multi-language files (en.strings, id.strings, ja.strings, ko.strings, zh-HK.strings, zh-Hant.strings).

OCRDetectSDKForTech.framework

Trimmable

ID card photo recognition module. Trimmable.

DTFNFCIdentityManager.framework

Trimmable

NFC authentication module. Trimmable.

MultiFactorFacade.framework

Required

Required module, intent authentication module.

AliyunDevicePKG.framework

Required

Device Assistant module, protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APPSecuritySDK.framework

Required

Authentication security link protection module. Strongly recommended for integration.

Note

If this module is trimmed from the SDK, IDFA is not collected, which may also increase security risks.

DTFBeauty.framework

Trimmable

Optional module, beauty filter feature during face preview.

Financial-grade NFC Authentication Solution

Module name

Trimmable

Special notes

AliyunFaceAuthFacade.framework

Required

None.

ToygerService.framework

Trimmable

None.

DTFIdentityManager.framework

Trimmable

None.

ToygerNative.framework

Trimmable

None.

BioAuthEngine.framework

Trimmable

None.

DTFUtility.framework

Required

None.

VerifyNativeAbility.framework

Trimmable

None.

APBToygerFacade.framework

Trimmable

Trimmable.

OCRDetectSDKForTech.framework

Trimmable

ID card photo recognition module. Trimmable.

DTFNFCIdentityManager.framework

Required

Required module, NFC authentication module.

MultiFactorFacade.framework

Trimmable

Intent authentication module. Trimmable.

AliyunDevicePKG.framework

Required

Device Assistant module, protects the client-side authentication environment during face verification.

Note

If your business has strict constraints on package size, you can consider trimming this module. Trimming this module weakens security countermeasures and does not support the Device Assistant value-added service.

APPSecuritySDK.framework

Required

Authentication security link protection module. Strongly recommended for integration.

Note

If this module is trimmed from the SDK, IDFA is not collected, which may also increase security risks.

DTFBeauty.framework

Trimmable

Optional module, beauty filter feature during face preview.