tencent cloud

eKYC

Release Notes and Announcements
Release Notes
Product Announcements
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Purchase Method
Payment Overdue
Refund
Integration Guide
Getting Started
Selfie Verification (Pure API)
Selfie Verification (Mobile HTML5)
Selfie Verification (App SDK)
Identity Verification (Mobile HTML5)
Identity Verification (App SDK)
Other Guide
API Documentation
History
Introduction
API Category
Making API Requests
Selfie Verification (Pure API) APIs
Selfie Verification (App SDK) APIs
Identity Verification (App SDK) APIs
Identity Verification(Mobile HTML5) APIs
AI Face Shield (Pure API) APIs
Other APIs
Data Types
Error Codes
FAQs
Contact Us
Glossary
eKYC Policy
Privacy Policy
Data Processing And Security Agreement
Service Level Agreement

APIs for iOS

PDF
Focus Mode
Font Size
Last updated: 2026-03-27 11:17:34

API Overview

The main API classes used in the Identity Verification (App SDK) for iOS are VerificationKit, VerificationConfig, and VerifiCommDef. Specific APIs in these classes are described as below.

VerificationKit

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.

initWithViewController

// Initialization method
- (void)initWithViewController:(UIViewController *)viewController;
Feature description:
The initialization API for Identity Verification (App SDK).
Input parameters:
Type
Parameter
Description
UIViewController
viewController
Calls the viewController object of the current SDK page

clearInstance

/// Clear SDK resources
+ (void)clearInstance;
Feature description:
SDK resource release API.

startVerifiWithConfig

/// Start verification
- (void)startVerifiWithConfig:(VerificationConfig *)verifiConfig
withSuccCallback:(TXYVerifiKitProcessSucceedBlock)succCallback
withFialCallback:(TXYVerifiKitProcessFailedBlock)failCallback;
Feature description:
The method to initiate the Identity Verification process.
Input parameters:
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

TXYVerifiKitProcessSucceedBlock

/// Callback API for successful detection with the SDKKIt
/// @param errorCode: Error code
/// @param resultInfo: Information returned by the callback
/// @param reserved: Reserved
typedef void (^TXYVerifiKitProcessSucceedBlock)(int errorCode,id _Nonnull resultInfo, id _Nullable reserved);

TXYVerifiKitProcessFailedBlock

/// Callback API for detection failure with the SDKKIt
/// @param errorCode: Error code
/// @param errorMsg: Error message
/// @param reserved: Reserved
typedef void (^TXYVerifiKitProcessFailedBlock)(int errorCode, NSString *_Nonnull errorMsg, id _Nullable reserved);

VerificationConfig

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



OcrCustomConfig

OcrCustomConfig refers to the custom UI configuration class for the document recognition and authenticity verification phase.
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

FaceCustomConfig

FaceCustomConfig is the custom UI configuration class for the selfie verification stage.

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

VerifiCommDef

HYEkycLanguageType

Multilingual configuration information for the SDK default interface.
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.



VerificationDelegate

The SDK interface lifecycle event protocol is used to monitor the creation and destruction events of the document recognition interface and selfie verification interface:
@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 codes and descriptions


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

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback