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 | Initialization APIs |
clearInstance | Resource Release API |
startVerifiWithConfig | Initiate the Identity Verification process. |
// Initialization method- (void)initWithViewController:(UIViewController *)viewController;
Parameter Type | Parameter Name | 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;
Parameter Type | Parameter Name | Parameter Description |
VerificationConfig | verifiConfig | Configuration information for the current process initialization |
TXYVerifiKitProcessSucceedBlock | succCallback | Callback for successful SDK detection |
TXYVerifiKitProcessFailedBlock | failCallback | Callback for SDK detection failure |
/// 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 | Meaning | Default Value |
NSString | licPath | The path to the customer-applied user-authorized License file | 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 be enabled (YES). | NO |
NSString | riskLicense | Risk control authorization file path; required when openCheckRiskMode is set to YES. | Null |
NSString | ekycToken | Token value obtained from the server-side, serving as the unique business credential for this identity verification. | Null |
HYEkycLanguageType | languageType | Set the SDK language type. | HY_EKYC_EN |
BOOL | isHiddenAlbum | Whether to hide the button for obtaining local images from the gallery in the OCR process | NO |
BOOL | isHiddenFlash | Whether to hide the button for turning on the flashlight in the OCR process | NO |
NSString | userLanguageFileName | The target .lproj folder name in the custom language Bundle, such as ja.lproj. This takes effect only when languageType is set to HY_EKYC_CUSTOMIZE_LANGUAGE. | Null |
BOOL | isShowPrivacyAgreementDialog | Whether the privacy policy pop-up is displayed before the verification process starts | YES |
CGFloat | ocrAutoTimeout | User-defined UI resource package name. | Null |
CGFloat | livenessAutoTimeout | User-defined multilingual resource package name. | Null |
BOOL | isOpenClipImage | Specify the filename for custom multilingual usage. | NO |
BOOL | isUseBackCameraOnFaceAuth | Whether to use the rear camera during the face detection phase | NO |
BOOL | supportSystemAdjustsFont | Whether to honor font size adjustments in the system accessibility settings | NO |
OcrCustomConfig | ocrCustomConfig | Custom UI configuration for the OCR phase, controlling the recognition frame 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 | Absolute path of the user-defined UI resource bundle; defaults to nil when custom UI is not in use | Null |
NSString | userLanguageBundlePath | Absolute path of the user-defined multilingual resource bundle; 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 selfie verification resource bundle (face-tracker-v003.bundle), used for dynamic download scenarios; when nil, use face-tracker-v003.bundle in mainBundle | Null |
BOOL | isShowTipsPage | Whether to display the preparation guide page for the selfie verification phase (FaceVerifiPreViewController). When set to NO, the SDK skips the guide page and directly goes to liveness detection. | YES |
BOOL | isShowResultPage | Whether to display the result page for the selfie verification phase (FaceVerifiResultViewController). When set to NO, the SDK skips the result page and directly returns the outcome to the host app via callback. | YES |
BOOL | isEntireHighlight | Whether to keep the phone screen brightness at maximum level throughout the liveness detection process. When set to YES, the screen remains at maximum brightness throughout the Face Recognition process. | NO |
Type | Name | Meaning | Default Value |
UIColor | rectNormalColor | Color of the detection frame in normal state | Null |
UIColor | rectErrorColor | Color of the detection frame in error state | Null |
UIColor | rectPassColor | Color of the detection frame in passed state | Null |
UIColor | tipsNormalColor | Color of the prompt text in normal state | Null |
UIColor | tipsErrorColor | Color of the prompt text in error state | Null |
UIColor | tipsPassColor | Color of the prompt text in passed state | Null |
UIFont | tipsFont | Font for the prompt text (when set, takes precedence over tipsFontSize) | Null |
CGFloat | rectScaleX | Horizontal margin of the recognition frame as a percentage of screen width, with a value range of 0.0~0.15 | 0.03 |
CGFloat | rectTopMarginScale | Top margin of the recognition frame as a percentage of screen height (only effective in portrait mode; centered in landscape mode) | 0.28 |
BOOL | isShowTips | Whether to display the prompt text | YES |
NSString | tipsShowText | Custom prompt text content; falls back to the SDK default copy when set to nil | Null |
Type | Name | Meaning | Default Value |
UIColor | backgroundColor | Background color of the selfie verification page | Null |
UIColor | tipsTextColor | Color of the prompt text (normal state) | Null |
UIColor | tipsTextErrorColor | Color of the prompt text (error state) | Null |
UIFont | tipsTextFont | Font for the prompt text (including size) | Null |
UIColor | faceCircleErrorColor | Color of the face circular frame (error state) | Null |
UIColor | faceCircleCorrectColor | Color of the face circular frame (correct state) | Null |
UIColor | countDownTextColor | Countdown text color | Null |
UIColor | cancelButtonTextColor | Cancel button text color | Null |
UIStatusBarStyle | faceStatusBarStyle | Status bar text color style on the face detection page. Defaults to follow the system (UIStatusBarStyleDefault) | UIStatusBarStyleDefault |
BOOL | faceAuthAnimated | Whether to use transition animation when accessing the face detection page. When set to NO, the page opens without animation. | YES |
BOOL | isHideFaceCountDown | Whether to hide the countdown on the face detection page. When set to YES, all countdown displays are hidden. | NO |
Type | Meaning |
HY_EKYC_DEFAULT = 0 | Follow the system language version |
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 Code | Error code value | Error Code Definition |
HY_EKYC_SUCCESS | 0 | Successful |
HY_EKYC_VERIFI_FAIL | -1 | Detection Failed |
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 | Initialization Parameter Exception |
HY_EKYC_BUNDLE_CONFIGURATION_EXCEPTION | 311 | bundle configuration exception |
HY_EKYC_PLEASE_CALL_FIRST_INIT_API | 313 | First, call the initialization API. |
HY_EKYC_SDK_AUTH_FAILED | 314 | SDK Authorization Failure |
HY_EKYC_USER_VOLUNTARILY_CANCELED | 315 | The user manually cancels. |
HY_EKYC_GET_REMOTE_DATA_EXCEPTION | 322 | Error Obtaining Remote Data |
피드백