Release Notes
Product Announcements
VerificationKit, VerificationConfig, and VerifiCommDef. Specific APIs in these classes are described as below.VerificationKit is a class of external APIs for the Identity Verification (App SDK). The main logic is completed with this class.API | Feature Description |
initWithViewController | Initializes the SDK. |
clearInstance | Releases resources. |
startVerifiWithConfig | Initiate the Identity Verification process. |
// Initialization method- (void)initWithViewController:(UIViewController *)viewController;
Type | Parameter | Description |
UIViewController | viewController | Calls the viewController object of the current SDK page |
/// Clear SDK resources+ (void)clearInstance;
/// Start verification- (void)startVerifiWithConfig:(VerificationConfig *)verifiConfigwithSuccCallback:(TXYVerifiKitProcessSucceedBlock)succCallbackwithFialCallback:(TXYVerifiKitProcessFailedBlock)failCallback;
Type | Parameter | Description |
VerificationConfig | verifiConfig | Configuration information for starting this identity verification process |
TXYVerifiKitProcessSucceedBlock | succCallback | SDK detection success callback |
TXYVerifiKitProcessFailedBlock | failCallback | SDK detection failure callback |
/// Callback API for successful detection with the SDKKIt/// @param errorCode: Error code/// @param resultInfo: Information returned by the callback/// @param reserved: Reservedtypedef void (^TXYVerifiKitProcessSucceedBlock)(int errorCode,id _Nonnull resultInfo, id _Nullable reserved);
/// Callback API for detection failure with the SDKKIt/// @param errorCode: Error code/// @param errorMsg: Error message/// @param reserved: Reservedtypedef void (^TXYVerifiKitProcessFailedBlock)(int errorCode, NSString *_Nonnull errorMsg, id _Nullable reserved);
VerificationConfig is the configuration entity class used during the SDK startup, which mainly covers the following attributes:Type | Name | Description | Default Value |
NSString | licPath | Customer-applied user License file path | Null |
BOOL | openCheckRiskMode | Whether to enable device risk detection. When the input parameter SdkVersion in ApplySdkVerificationToken is set to ENHANCE or PLUS, it must be configured to enable (YES). | NO |
NSString | riskLicense | Risk control authorization file path; mandatory when openCheckRiskMode is set to YES | Null |
NSString | ekycToken | The Token value obtained from the server, serving as the unique business credential for this identity verification process. | Null |
HYEkycLanguageType | languageType | Set the SDK language type | HY_EKYC_EN |
BOOL | isHiddenAlbum | Whether to hide the button for getting local images from the album during the OCR process | NO |
BOOL | isHiddenFlash | Whether to hide the flashlight button during the OCR process | NO |
NSString | userLanguageFileName | Custom language Bundle: The target .lproj folder name, such as ja.lproj. This takes effect only when languageType is set to HY_EKYC_CUSTOMIZE_LANGUAGE. | Null |
BOOL | isShowPrivacyAgreementDialog | Whether to display the privacy agreement pop-up before the verification process is started | YES |
CGFloat | ocrAutoTimeout | Custom UI bundle name | Null |
CGFloat | livenessAutoTimeout | Custom language bundle name | Null |
BOOL | isOpenClipImage | Custom language filename | NO |
BOOL | isUseBackCameraOnFaceAuth | Whether to use the rear camera during the face detection stage | NO |
BOOL | supportSystemAdjustsFont | Whether to respond to font size adjustments in the system accessibility settings | NO |
OcrCustomConfig | ocrCustomConfig | Custom UI configuration for the OCR stage, controlling the recognition box color, prompt text style, and more. | Null |
FaceCustomConfig | faceCustomConfig | Custom UI configuration for the selfie verification phase, controlling the background color, prompt text style, circular frame color, and more. | Null |
VerificationDelegate | delegate | SDK interface lifecycle event delegate, which can listen to the creation and destruction of OCR/selfie verification interfaces | Null |
NSString | userUIBundlePath | Custom UI bundle absolute path; defaults to empty if no custom UI is used | Null |
NSString | userLanguageBundlePath | Custom language bundle absolute path; when nil, use huiyan_verification.bundle in mainBundle | Null |
NSString | huiyanSDKBundlePath | Absolute path of the UI resource bundle for selfie verification phase (HuiYanSDKUI.bundle); when nil, use HuiYanSDKUI.bundle in mainBundle | Null |
NSString | verificationBundlePath | Absolute path of the core verification resource bundle for the identity verification phase (huiyan_verification.bundle); when nil, use huiyan_verification.bundle in mainBundle | Null |
NSString | ocrSDKBundlePath | Absolute path of the OCR resource bundle (OcrSDK.bundle), used for dynamic download scenarios; when nil, use OcrSDK.bundle in mainBundle. | Null |
NSString | faceTrackerBundlePath | Absolute path of the local selfie verification resource bundle (face-tracker-v003.bundle), used for dynamic download scenarios; when nil, use face-tracker-v003.bundle in mainBundle | Null |
Type | Name | Description | Default Value |
UIColor | rectNormalColor | Normal state color for the recognition frame | Null |
UIColor | rectErrorColor | Error state color for the recognition frame | Null |
UIColor | rectPassColor | Pass state color for the recognition frame | Null |
UIColor | tipsNormalColor | Normal state color for prompt text | Null |
UIColor | tipsErrorColor | Error state color for prompt text | Null |
UIColor | tipsPassColor | Pass state color for prompt text | Null |
UIFont | tipsFont | Prompt text font (after setting, takes precedence over tipsFontSize) | Null |
CGFloat | rectScaleX | Horizontal margin ratio of the recognition frame to screen width, value range: 0.0~0.15 | 0.03 |
CGFloat | rectTopMarginScale | Top margin ratio of the recognition frame to screen height (effective only in portrait mode; displayed centered in landscape mode) | 0.28 |
BOOL | isShowTips | Whether to display prompt text | YES |
NSString | tipsShowText | Custom prompt text content; when set to nil, the SDK default text will be displayed. | Null |
Type | Name | Description | Default Value |
UIColor | backgroundColor | Background color of the selfie verification page | Null |
UIColor | tipsTextColor | Color for prompt text (normal state) | Null |
UIColor | tipsTextErrorColor | Color for prompt text (error state) | Null |
UIFont | tipsTextFont | Prompt text font (including size) | Null |
UIColor | faceCircleErrorColor | Face circle frame color (error state) | Null |
UIColor | faceCircleCorrectColor | Face circle frame color (correct state) | Null |
UIColor | countDownTextColor | Countdown text color | Null |
UIColor | cancelButtonTextColor | Cancel button text color | Null |
Type | Description |
HY_EKYC_DEFAULT = 0 | Auto |
HY_EKYC_ZH_HANS | Simplified Chinese |
HY_EKYC_ZH_HANT | Traditional Chinese |
HY_EKYC_EN | English |
HY_EKYC_CUSTOMIZE_LANGUAGE | Custom language. The set custom language bundle ( userLanguageBundleName) is used. |
@protocol VerificationDelegate <NSObject>@optional/// Callback when the OCR interface is created. authView is the root view displayed by the SDK.- (void)ocrMainViewCreate:(UIView *)authView;/// Callback when the OCR interface is removed.- (void)ocrMainViewDestroy;/// Callback when the face interface is created. authView is the root view displayed by the SDK.- (void)faceMainViewCreate:(UIView *)authView;/// Callback when the face interface is removed.- (void)faceMainViewDestroy;@end
Error | Error Code | Error Description |
HY_EKYC_SUCCESS | 0 | Success |
HY_EKYC_VERIFI_FAIL | -1 | Detection failure |
HY_EKYC_VERIFI_OCR_FAIL | -2 | Document recognition failure |
HY_EKYC_SDK_INNER_ERR | -4 | SDK internal error |
HY_EKYC_NETWORK_ERROR | 272 | Network Exception |
HY_EKYC_INITIALIZATION_PARAMETER_EXCEPTION | 310 | Parameter initialization exception |
HY_EKYC_BUNDLE_CONFIGURATION_EXCEPTION | 311 | bundle configuration exception |
HY_EKYC_PLEASE_CALL_FIRST_INIT_API | 313 | Call the initialization API first |
HY_EKYC_SDK_AUTH_FAILED | 314 | SDK authorization failure |
HY_EKYC_USER_VOLUNTARILY_CANCELED | 315 | It is manually canceled by user |
HY_EKYC_GET_REMOTE_DATA_EXCEPTION | 322 | Error in getting remote data |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback