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 | Starts 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 | Callback for successful SDK detection |
TXYVerifiKitProcessFailedBlock | failCallback | Callback for failed SDK detection |
/// 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 | ekycToken | Token requested from the server, which is used as the unique business credential for this identity verification process | Empty |
NSString | licPath | Path of the license file applied for by client for user authorization | Empty |
long | hyFaceTimeOut | Timeout period for a single action of identity verification | 10000 ms (10s) |
BOOL | isHiddenAlbum | Whether to hide the OCR album button | No |
BOOL | isHiddenFlash | Whether to hide the OCR flashlight button | No |
HYEkycLanguageType | languageType | Language setting for this process | DEFAULT (0) |
OCRRegionType | ocrRegionType | Type of document to recognize | 0 |
NSString | userUIBundleName | Custom UI bundle name | Nil |
NSString | userLanguageBundleName | Custom language bundle name | nil |
NSString | userLanguageFileName | Custom language filename | nil |
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. |
Enumerated Value | Description |
OCR_TYPE_DEFULT = 0 | Left empty by default |
OCR_TYPE_HK | Hong Kong (China) identity card |
OCR_TYPE_ML | Malaysian identity card |
OCR_TYPE_PV_ID | Philippine driver's license |
OCR_TYPE_PDL | Philippine voters ID card |
OCR_TYPE_INDONESIA | Indonesian identity card |
OCR_TYPE_SINGAPORE | Singapore identity card |
OCR_TYPE_PH_TINID | Philippine TIN ID card |
OCR_TYPE_PH_SSSID | Philippines SSS ID card |
OCR_TYPE_PH_UMID | Philippines UMID card |
OCR_TYPE_MLID_PASSPORT | Passport |
Error | Error Code | Error Description |
HY_SUCCESS | 0 | Success |
HY_VERIFI_FAIL | -1 | Detection failure |
HY_VERIFI_OCR_FAIL | -2 | Document recognition failed |
HY_SDK_INNER_ERR | -4 | Internal error |
HY_INITIALIZATION_PARAMETER_EXCEPTION | 310 | Parameter initialization exception |
HY_BUNDLE_CONFIGURATION_EXCEPTION | 311 | Bundle configuration exception |
HY_YTSDK_CONFIGURATION_EXCEPTION | 312 | YouTu configuration exception |
HY_PLEASE_CALL_FIRST_INIT_API | 313 | Call the initialization API first |
HY_SDK_AUTH_FAILED | 314 | SDK authorization failure |
HY_USER_VOLUNTARILY_CANCELED | 315 | It is manually canceled by user |
HY_YTSDK_LOCAL_AUTH_FAILED | 316 | Local face detection failure of SDK |
HY_CAMERA_OPEN_FAIL | 317 | Failed to enable the camera |
HY_DONOT_SWITCH_APPS | 318 | Do not switch the application during identity verification |
HY_CAMEREA_PERMISSION_EXCEPTION | 319 | Camera permission exception |
HY_SDK_VEDIO_CUT_EXCEPTION | 320 | Failed to clip the video |
HY_LIGHT_DATA_FORMAT_EXCEPTION | 321 | Invalid reflection data format |
HY_GET_REMOTE_DATA_EXCEPTION | 322 | Error in getting remote data |
Was this page helpful?