Release Notes
Product Announcements
VerificationConfig.languageType:Enumeration Value | Description |
HY_EKYC_DEFAULT | Follows system settings |
HY_EKYC_ZH_HANS | Simplified Chinese |
HY_EKYC_ZH_HANT | Traditional Chinese |
HY_EKYC_EN | English (Default) |
HY_EKYC_CUSTOMIZE_LANGUAGE | Custom language |
VerificationConfig *config = [[VerificationConfig alloc] init];config.languageType = HY_EKYC_ZH_HANS;
demo/ directory to find the project files, then locate the Localizable under the UserLanguageBundle directory; this part serves as the translation source file.
UserLanguageBundle (Build Target) in the project.
ja.lproj).

// The left side is the Key used by the SDK, and the right side is the translation content in the target language."Verifi_OK"="OK";"Verifi_exit"="Exit";// ... For the remaining Keys, refer to the Key reference table below.

UserLanguageBundle.bundle.
Info.plist and _CodeSignature folders within the Bundle.UserLanguageBundle.bundle into the host project.VerificationConfig *config = [[VerificationConfig alloc] init];// 1. Enable custom language modeconfig.languageType = HY_EKYC_CUSTOMIZE_LANGUAGE;// 2. Specify the absolute path to the Bundleconfig.userLanguageBundlePath = [[NSBundle mainBundle] pathForResource:@"UserLanguageBundle" ofType:@"bundle"];// 3. Specify the language folder nameconfig.userLanguageFileName = @"ja.lproj";
Required | Type | Required condition | Description |
languageType | Enumeration | Required | Set to HY_EKYC_CUSTOMIZE_LANGUAGE to enable customization only when |
userLanguageBundlePath | NSString * | Required when a custom language is used | UserLanguageBundle's absolute path |
userLanguageFileName | NSString * | Required when a custom language is used | The target .lproj folder name, such as ja.lproj |
userLanguageBundlePath is nil, the SDK will look up multilingual resources from the huiyan_verification.bundle in the mainBundle (the default behavior).OcrCustomConfig *ocrConfig = [[OcrCustomConfig alloc] init];ocrConfig.rectNormalColor = [UIColor whiteColor]; // Normal color for the recognition frameocrConfig.rectErrorColor = [UIColor redColor]; // Error color for the recognition frameocrConfig.rectPassColor = [UIColor greenColor]; // Pass color for the recognition frameocrConfig.tipsNormalColor = [UIColor whiteColor]; // Normal color for the prompt textocrConfig.tipsErrorColor = [UIColor redColor]; // Error color for the prompt textocrConfig.tipsPassColor = [UIColor greenColor]; // Pass color for the prompt textocrConfig.tipsFont = [UIFont systemFontOfSize:14]; // Font for the prompt textocrConfig.rectScaleX = 0.03; // Horizontal margin ratio for the recognition frame (0.0~0.15)ocrConfig.rectTopMarginScale = 0.28; // Top margin ratio for the recognition frame (only effective in portrait mode)ocrConfig.isShowTips = YES; // Show prompt textocrConfig.tipsShowText = nil; // Custom prompt text (when set to nil, the SDK default text will be displayed.)VerificationConfig *config = [[VerificationConfig alloc] init];config.ocrCustomConfig = ocrConfig;
FaceCustomConfig *faceConfig = [[FaceCustomConfig alloc] init];faceConfig.backgroundColor = [UIColor blackColor]; // Background colorfaceConfig.tipsTextColor = [UIColor whiteColor]; // Prompt text colorfaceConfig.tipsTextErrorColor = UIColorFromRGB(0xFF3B30); // Error state color for the prompt textfaceConfig.tipsTextFont = [UIFont systemFontOfSize:16]; // Font for the prompt textfaceConfig.faceCircleErrorColor = UIColorFromRGB(0xFF3B30); // Error state color for the face framefaceConfig.faceCircleCorrectColor = UIColorFromRGB(0x34C759); // Correct state color for the face framefaceConfig.countDownTextColor = [UIColor whiteColor]; // Countdown text colorfaceConfig.cancelButtonTextColor = [UIColor whiteColor]; // Cancel button text colorVerificationConfig *config = [[VerificationConfig alloc] init];config.faceCustomConfig = faceConfig;
VerificationConfig.delegate, you can monitor the creation and destruction events of the SDK interface, for example, inserting custom logic when the OCR or selfie verification interface is displayed:VerificationConfig *config = [[VerificationConfig alloc] init];config.delegate = self; // Implements the VerificationDelegate protocol
// Methods of the VerificationDelegate protocol@protocol VerificationDelegate <NSObject>@optional/// Callback when the OCR interface is displayed, where authView is the root view presented by the SDK- (void)ocrMainViewCreate:(UIView *)authView;/// Callback when the OCR interface is removed- (void)ocrMainViewDestroy;/// Callback when the selfie verification interface is displayed, authView is the root view presented by the SDK.- (void)faceMainViewCreate:(UIView *)authView;/// Callback when the selfie verification interface is removed- (void)faceMainViewDestroy;@end
@interface ViewController ()<VerificationDelegate>@end@implementation ViewController// OCR interface creation callback- (void)ocrMainViewCreate:(UIView *)authView {[self addCustomLabel:authView];}// Callback when the OCR interface is reclaimed- (void)ocrMainViewDestroy {NSLog(@"ekyc ocr vc destroy");}// Callback upon creation of the selfie verification interface- (void)faceMainViewCreate:(UIView *)authView {[self addCustomLabel:authView];}// Callback when the selfie verification interface is reclaimed- (void)faceMainViewDestroy {NSLog(@"ekyc face vc destroy");}- (void)addCustomLabel:(UIView *)authView {UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, 100, 30)];label.backgroundColor = [UIColor blackColor];label.textColor = [UIColor yellowColor];label.text = @"This is a newly added control";label.font = [UIFont systemFontOfSize:20];label.textAlignment = NSTextAlignmentCenter;[authView addSubview:label];}@end
UserUIBundle build target of the project:demo/└── UserUIBundle/├── TXYOsAuthingViewController.xib # liveness face comparison page├── CustOcrView.xib # ID document recognition page├── txy_nav_back.png # Back button icon (replaceable)└── txy_waring.png # warning icon (replaceable)
XIB file name | corresponding page | Description |
TXYOsAuthingViewController | Selfie verification page | Liveness detection and face comparison main page |
CustOcrView | Identity document recognition page | OCR capture and recognition main interface |



demo/ directory.UserUIBundle (Build Target) in the project.TXYOsAuthingViewController.xib or CustOcrView.xib as needed, or add new controls.UserUIBundle.bundle.Info.plist and _CodeSignature folders within the Bundle.UserUIBundle.bundle into the host project.VerificationConfig *config = [[VerificationConfig alloc] init];// Specify the absolute path to the custom UI Bundleconfig.userUIBundlePath = [[NSBundle mainBundle] pathForResource:@"UserUIBundle" ofType:@"bundle"];
demo/UserUIBundle/ to the code repository of the host project as the source code directory for custom UI after custom modifications are made. All subsequent modifications will be based on this directory.VerificationConfig *config = [[VerificationConfig alloc] init];config.licPath = @"/path/to/license.lic";config.ekycToken = @"your-ekyc-token";// --- Custom UI ---config.userUIBundlePath = [[NSBundle mainBundle] pathForResource:@"UserUIBundle" ofType:@"bundle"];config.delegate = self; // Optional: Implement VerificationDelegate to listen to UI events// Code-level style fine-tuning (Optional; use when you don't need to modify XIB files)config.ocrCustomConfig.rectNormalColor = [UIColor colorWithWhite:1.0 alpha:0.8];config.faceCustomConfig.backgroundColor = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1.0];// --- Custom Multilingual ---config.languageType = HY_EKYC_CUSTOMIZE_LANGUAGE;config.userLanguageBundlePath = [[NSBundle mainBundle] pathForResource:@"UserLanguageBundle" ofType:@"bundle"];config.userLanguageFileName = @"ja.lproj";// Start verificationVerificationKit *kit = [[VerificationKit alloc] init];[kit initWithViewController:self];[kit startVerifiWithConfig:config withSuccCallback:^(int errorCode, id resultInfo, id reserved) {// Verification successful} withFialCallback:^(int errorCode, NSString *errorMsg, id reserved) {// Verification failed. Error code 311 indicates an exception in the Bundle path configuration.}];
failCallback:Error Code | Enumeration | Trigger Condition |
311 | HY_EKYC_BUNDLE_CONFIGURATION_EXCEPTION | The specified Bundle path does not exist or is not a directory. |
errorMsg) is in the format of "<field name> not found", for example:"userUIBundle not found": The path specified by userUIBundlePath does not exist."userLanguageBundle not found": The path specified by userLanguageBundlePath does not exist.Old field (removed) | New field | Change Description |
userUIBundleName | userUIBundlePath | Changed from Bundle name to absolute path |
userLanguageBundleName | userLanguageBundlePath | Changed from Bundle name to absolute path |
// Old syntax (v1.0.1.4 and below)config.userUIBundleName = @"UserUIBundle";config.userLanguageBundleName = @"UserLanguageBundle";// New syntax (v1.0.1.5 and above)config.userUIBundlePath = [[NSBundle mainBundle] pathForResource:@"UserUIBundle" ofType:@"bundle"];config.userLanguageBundlePath = [[NSBundle mainBundle] pathForResource:@"UserLanguageBundle" ofType:@"bundle"];
nil, the SDK maintains the same default behavior as the old version (searching for the corresponding Bundle from mainBundle), which does not affect integrators who do not use custom features.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