VerificationConfig.languageType:Enumeration Value | Meaning |
HY_EKYC_DEFAULT | Following 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 |
userLanguageBundlePath | NSString * | Required when custom languages are used. | The absolute path of UserLanguageBundle |
userLanguageFileName | NSString * | Required when custom languages are used | 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
Control Naming | Control description | tag value |
cancelButton | Selfie Verification Page Cancel Button | 101 |
timeoutLabel | Selfie Verification Page Countdown | 102 |
tipsLabel | Selfie Verification Page Prompt | 103 |
navBarView | Selfie Verification Page Virtual Navigation Bar | 200 |
faceMainViewCreate: callback, after the selfie verification page is created, you can directly obtain the controls in the table above via viewWithTag: and modify them.// Callback upon creation of the selfie verification interface- (void)faceMainViewCreate:(UIView *)authView {// Modify the text color and font of the Cancel buttonUIButton *cancelButton = (UIButton *)[authView viewWithTag:101];[cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];[cancelButton setTitle:@"" forState:UIControlStateNormal];cancelButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];// Modify the image of the Cancel buttonUIImage *originalImage = [UIImage systemImageNamed:@"chevron.left"];[cancelButton setImage:originalImage forState:UIControlStateNormal];// Modify the leading left margin constraint of the Cancel buttonfor (NSLayoutConstraint *constraint in cancelButton.superview.constraints) {if ((constraint.firstItem == cancelButton && constraint.firstAttribute == NSLayoutAttributeLeading) ||(constraint.secondItem == cancelButton && constraint.secondAttribute == NSLayoutAttributeLeading)) {constraint.constant = 0.0;break;}}// Modify the countdown Tag color and fontUILabel *timeoutLabel = (UILabel *)[authView viewWithTag:102];timeoutLabel.textColor = [UIColor whiteColor];timeoutLabel.font = [UIFont systemFontOfSize:15];// Modify the Virtual Navigation Bar color (applicable to Liveness Face Comparison Mode and Liveness Face Detection Mode only)UIView *navBarView = [authView viewWithTag:200];navBarView.backgroundColor = [UIColor redColor];// Add navigation bar title (applicable to Identity Verification Mode and Selfie Verification Mode only)CGFloat statusBarHeight = [UIApplication sharedApplication].statusBarFrame.size.height;CGRect frame = CGRectMake(0, statusBarHeight, navBarView.bounds.size.width, navBarView.bounds.size.height - statusBarHeight);UILabel *label = [[UILabel alloc]initWithFrame:frame];label.text = @"Custom Title";label.textColor = [UIColor blackColor];label.textAlignment = NSTextAlignmentCenter;[navBarView addSubview:label];}
if (view) { ... } to perform a null check, to prevent crashes when the control does not exist in certain modes.UserUIBundle build target of the project:demo/└── UserUIBundle/├── TXYOsAuthingViewController.xib # liveness face comparison page└── CustOcrView.xib # ID document recognition page
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} withFailCallback:^(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 either 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.Legacy 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.피드백