Teydex iOS Document
This document contains all the necessary steps, usage examples, and platform-specific technical details for integrating the Teydex library securely and seamlessly on the iOS platform.
Version Requirements
Check your versions to use the Teydex iOS library without issues.
| Platform | Min version |
|---|---|
| iOS | iOS 15.0 |
| Swift 5.5 | |
| Xcode 26.1 |
Installation via Swift Package Manager
To add the KYCFramework package to your project, go to File > Add Package Dependencies in Xcode and enter the package URL below. The library will automatically download all required dependencies.
https://github.com/innovance-technologies/KYCFramework.git
KYCFramework is distributed in different package variants depending on whether the video call components are included. The variant and version tag to use for your integration is provided to you by the Innovance integration team.
After adding the package or upgrading the version, run File > Packages > Reset Package Caches in Xcode. Your project's Package.resolved may keep older versions of the dependencies, so "Update to Latest" alone may not be enough.
Project Configuration
Background Modes Settings
In the Signing & Capabilities tab, make sure the following options are checked under Background Modes:
- Audio, AirPlay, and Picture in Picture
- Voice over IP
- Background fetch
Info.plist Permissions
You need to add the following descriptions to your application's Info.plist file. These messages will be shown to users when permissions are requested:
<key>NSCameraUsageDescription</key>
<string>Allow access so others can see you during video calls</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow access so your location can be verified</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Allow access so your location can be verified</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow access so others can hear you during video calls</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow access to save your photos to the photo gallery</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow access to browse your photo gallery</string>
<key>NSLocationTemporaryUsageDescriptionDictionary</key>
<dict>
<key>FullAccuracy</key>
<string>Allow access so your location can be verified</string>
</dict>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Allow access to recognize speech</string>
Info Screen
The Info screen in your KYC application refers to the information pages displayed before steps. Optionally, the following parameters can be added for each step.
Info Screen Properties
| Parameter | Type | Description |
|---|---|---|
| setTitleText | String | Specifies the title text to be displayed on the Info screen. |
| setDescriptionText | String | Specifies the description text to be displayed on the Info screen. |
| setButtonText | String | Specifies the text of the button that will start the step shown on the Info screen. |
| setAssetImageName | String | Specifies the image to be shown on the Info screen. |
| setLottieFileName | String | Specifies the Lottie animation to be shown on the Info screen. |
| setBullets | [String] | Can be used when you want to provide bullet-point information about the next step on the Info screen. |
| setCancelButtonIsActive | Bool | Enables or disables the cancel button in the top-right corner of the Info screen. Disabled by default. |
The bullet icon is not set per step; it is configured across the SDK with UIConfig.bulletIconName.
Info Screen Usage
let frontInfo = InfoPresentationModelBuilder()
.setTitleText("ID Card Front")
.setDescriptionText("Please follow the steps below carefully:")
.setButtonText("Continue")
.setLottieFileName("front")
.setBullets([
"Place Your ID\n" +
"Hold the front of your ID parallel to the phone screen. The ID must be positioned so that it fits completely within the template shown on the screen.",
"Visibility of ID Information\n Make sure all information on the ID is clearly visible. The ID information should not be blurry and must be easily readable."
])
.build()
Glare Detection
Starting with v1.3.1, glare detection has been added to the Front, Back, Liveness, and Passport steps to ensure the user presents the document under appropriate lighting conditions. If the environment is too bright, too dark, or there is glare on the document, a warning text is shown to the user on the relevant screen.
The following parameters can be used commonly in the Front, Back, and Passport steps:
| Parameter | Type | Description |
|---|---|---|
| isGlareDetectionEnable | Bool | Enables glare detection for the relevant step. Default is true for Front and Back, false for Passport. |
| glareDetectedText | String | Text displayed when glare is detected on the document. |
| tooBrightText | String | Warning text displayed when the environment is too bright. |
| tooDarkText | String | Warning text displayed when the environment is too dark. |
| multipleDocumentsDetectedText | String | Warning text displayed when multiple documents are detected by the camera. |
The Liveness step only has parameters related to ambient lighting:
| Parameter | Type | Description |
|---|---|---|
| isGlareDetectionEnable | Bool | Enables ambient light monitoring in the Liveness step. Default is false; it must be explicitly set to true for monitoring to run. |
| tooBrightText | String | Warning text displayed when the environment is too bright. |
| tooDarkText | String | Warning text displayed when the environment is too dark. |
If any of these parameters are not provided, the SDK uses default Turkish warning texts.
Steps
The properties to be used in all steps are specified in this section. These properties are available in every step (Front, Back, Hologram, NFC, Liveness, VideoCall, VideoRecord, Passport, Selfie, KPS).
Step Properties
| Parameter | Type | Description |
|---|---|---|
| setInfoView | InfoPresentationModel? | Used to add an Info screen to the relevant step. Optional. |
| setTitle | String? | Represents the Toolbar text to be displayed in the relevant step. |
| setStepType | TeydexConstants.KYCStep? | Specifies the type of the step (.idcardFront, .idcardBack, etc.) |
| setStepInformationTextToSpeech | String? | Represents the text to be read aloud at the beginning of the step. |
| setIdentifyTimeout | TimeInterval? | Sets the timeout duration for the relevant step. Default value is 30 seconds. |
setIsGlareDetectionEnable | Bool? | Enables glare detection. |
setGlareDetectedText | String? | Warning displayed when glare is detected. |
setTooBrightText | String? | Warning displayed when the environment is too bright. |
setTooDarkText | String? | Warning displayed when the environment is too dark. |
setMultipleDocumentsDetectedText | String? | Warning displayed when multiple documents are detected. |
setCancelButtonIsActive | Bool | Controls whether the close button is shown at the top right of the capture screen for this step. Default false. |
setApproveButtonText | String? | Text of the approve button shown after capture. Overrides the global value from UIConfig.textConfig. |
setRetakeButtonText | String? | Text of the retake button shown after capture. Overrides the global value from UIConfig.textConfig. |
setNFCTextConfig | NFCTextConfig? | Only relevant for .nfc steps; customizes the texts on the NFC reading screen. |
setApproveButtonText and setRetakeButtonText are per-step and override the global texts provided through UIConfig.textConfig. setStartButtonText / setStopButtonText only take effect on .videoRecord steps.
Liveness Step Properties
| Parameter | Type | Description |
|---|---|---|
| setDirectionTextToSpeech | String, String, String, String, String | Sets the text-to-speech message for center, right, left, up, down directions. |
VideoRecord Step Properties
| Parameter | Type | Description |
|---|---|---|
| setStartButtonText | String? | Text for the button that starts recording. |
| setStopButtonText | String? | Text for the button that stops recording. |
| setApproveButtonText | String? | Text for the button used to approve the recording afterward. |
| setRetakeButtonText | String? | Text for the button used to re-record afterward. |
| setVideoRecordDuration | Int? | Maximum video recording duration (seconds). If left nil, the SDK falls back to its default value of 30 seconds. |
ID Card Front Step
let idFrontStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Front Side")
.setInfoView(frontInfo)
.setStepType(.idcardFront)
.setStepInformationTextToSpeech("Hold the front of your ID parallel to the phone screen. The ID must be positioned completely within the template.")
.setIsGlareDetectionEnable(true)
.setGlareDetectedText("Glare detected. Please hold the document at a different angle.")
.setTooBrightText("Environment is too bright. Please reduce the light.")
.setTooDarkText("Environment is too dark. Please move to a brighter area.")
.setMultipleDocumentsDetectedText("Please show only one document.")
.build()
ID Card Back Step
let idBackStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Back Side")
.setInfoView(backInfo)
.setStepType(.idcardBack)
.setStepInformationTextToSpeech("Hold the back of your ID parallel to the phone screen. Make sure all information is clearly visible.")
.setIsGlareDetectionEnable(true)
.setGlareDetectedText("Glare detected. Please hold the document at a different angle.")
.setTooBrightText("Environment is too bright. Please reduce the light.")
.setTooDarkText("Environment is too dark. Please move to a brighter area.")
.setMultipleDocumentsDetectedText("Please show only one document.")
.build()
NFC Step
The texts on the NFC reading screen can be customized per step with NFCTextConfig. When a field is not provided, the SDK falls back to its own localized text.
| Parameter | Type | Description |
|---|---|---|
successfulReadText | String? | Text shown when NFC reading completes successfully. |
scanDescription | String? | Instruction shown while prompting the user to hold the document near the phone. |
retryDescription | String? | Description shown when NFC reading fails. |
let nfcStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("NFC")
.setInfoView(nfcInfo)
.setStepType(.nfc)
.setStepInformationTextToSpeech("Hold your ID close to the back of your phone. Make sure NFC is enabled.")
.setNFCTextConfig(NFCTextConfig(
successfulReadText: "Your ID data was read successfully.",
scanDescription: "Place your ID against the back of your phone and hold it still.",
retryDescription: "The ID could not be read. Please hold your ID close to the back of the phone again."
))
.build()
Hologram Step
let hologramStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Hologram")
.setInfoView(hologramInfo)
.setStepType(.hologram)
.setStepInformationTextToSpeech("Scan the hologram label on your ID. The hologram should be clearly visible.")
.build()
Liveness Step
LivenessStepBuilder is used for the Liveness step. This builder provides the setDirectionTextToSpeech method to set direction-based TTS messages.
let faceStep = LivenessStepBuilder()
.setDirectionTextToSpeech(
center: "Look straight ahead, keeping your face in the center of the frame.",
right: "Turn your face to the right.",
left: "Turn your face to the left.",
up: "Turn your face upward.",
down: "Turn your face downward."
)
.setIdentifyTimeout(35)
.setTitle("Liveness Check")
.setInfoView(faceInfo)
.setStepInformationTextToSpeech("Look at the camera and position your face within the frame. Move your head according to the instructions.")
.setIsGlareDetectionEnable(true)
.setTooBrightText("Environment is too bright. Please reduce the light.")
.setTooDarkText("Environment is too dark. Please move to a brighter area.")
.build()
Note:
setGlareDetectedTextandsetMultipleDocumentsDetectedTextare not supported in the Liveness step; onlytooBrightTextandtooDarkTextare valid.
VideoCall Step
let videoCall = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Video Call")
.setInfoView(videoCallInfo)
.setStepType(.videoCall)
.setStepInformationTextToSpeech("Video call is starting. Make sure you have sufficient lighting.")
.build()
VideoRecord Step
A voice-verified video step in which the user creates a video recording by reading the on-screen text aloud.
The text the user must read aloud during the VideoRecord step is provided by the backend. It is sent to the backend in the transaction init request, inside the options object, via the video_record_prompt_text and video_record_prompt_mandatory_texts fields; the backend returns this text to the SDK during the step.
let videoRecordStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Voice Video Verification")
.setInfoView(videoRecordInfo)
.setStepType(.videoRecord)
.setStepInformationTextToSpeech("Create a video recording by reading the on-screen text aloud.")
.setStartButtonText("Start Recording")
.setStopButtonText("Stop Recording")
.setApproveButtonText("Approve")
.setRetakeButtonText("Retake")
.setVideoRecordDuration(30)
.build()
Note: The VideoRecord step on iOS currently exposes a smaller configuration surface than its Android counterpart. Timing/quality parameters like
videoQuality,faceCenterTimeoutMs, andreadyCountdownMs, along with face positioning/direction guidance texts (centerYourFaceText,tooCloseText,moveLeftText, etc.) and the reading-instruction text (readingInstructionText), are not yet configurable on iOS — these strings are currently hardcoded in the SDK.
Other Step Types
In addition to the steps above, step types that the backend can include in the flow are also configured through setStepType:
| Step type | Description |
|---|---|
.passport | Passport auto-detection step. Turkish and Russian passports are supported; the template is selected from the document type returned by the backend. Glare detection is disabled by default in this step. |
.selfie | Step in which a selfie photo is captured with the front camera. setApproveButtonText and setRetakeButtonText apply to this step. |
.ruAddressValidation | Verification step in which a photo of the address page of a Russian passport is captured. |
.kps | Identity Sharing System (KPS) verification. It has no user interface; the SDK performs the backend query directly and moves to the next step based on the result. |
These steps are only included in the flow according to the step list returned by the backend. The Step objects defined in stepList supply the title, info screen, and text settings to be used when the corresponding step enters the flow.
LivenessConfig
Used to customize the UI texts and visual style in the Liveness step.
LivenessConfig Properties
| Parameter | Type | Description |
|---|---|---|
| dotRadius | CGFloat? | Specifies the radius of the dots displayed on screen during the liveness check. |
| dotColor | UIColor? | Defines the default color of the dots used as liveness indicators. |
| activeDotColor | UIColor? | Sets the color of the active dot during the liveness check. |
| titleText | String? | The main title text displayed during the liveness check. |
| upText | String? | Instruction text displayed when the user needs to move their head upward. |
| downText | String? | Instruction text displayed when the user needs to move their head downward. |
| leftText | String? | Instruction text displayed when the user needs to turn their head to the left. |
| rightText | String? | Instruction text displayed when the user needs to turn their head to the right. |
| centerYourFaceText | String? | Instruction text asking the user to center their face within the frame. |
| faceNotDetectedText | String? | Message displayed when the user's face is not detected during the liveness check. |
| overlayText | String? | Text shown on the overlay before the face detection circle appears. |
LivenessConfig Usage
let livenessConfig = LivenessConfig(
dotRadius: 10.0,
dotColor: .gray,
activeDotColor: .green,
titleText: "Face Verification",
upText: "Please raise your head up",
downText: "Please lower your head",
leftText: "Please turn your head to the left",
rightText: "Please turn your head to the right",
centerYourFaceText: "Please center your face",
faceNotDetectedText: "Face could not be detected"
)
UIConfig
Used to configure the visual styles used in Info screens and bottom sheets.
UIConfig groups color, typography, shape, and bullet icon settings under a single structure.
UIConfig Properties
| Parameter | Type | Description |
|---|---|---|
| colors | ColorsConfig? | Used to configure the color settings for Info screens and bottom sheets. |
| typography | TypographyConfig? | Used to configure the font family, font sizes, and font weights to be used throughout the SDK. |
| shapes | ShapesConfig? | Used to configure the shape settings for Info screens and bottom sheets. |
| bulletIconName | String? | Specifies the name of the icon used for bullet points in Info screens and bottom sheets. |
| textConfig | TextConfig? | Used to customize the button texts on the photo approval screen. |
ColorsConfig Properties
| Parameter | Type | Description |
|---|---|---|
| buttonColor | UIColor? | Specifies the background color of buttons. |
| buttonTextColor | UIColor? | Sets the text color of buttons. |
| bulletTextColor | UIColor? | Defines the color of bulleted texts. |
| titleColor | UIColor? | Defines the color of the title text on Info screens. |
| descriptionColor | UIColor? | Defines the color of the description text on Info screens. |
| primaryColor | UIColor? | The primary brand color: outlined ("line") button borders and camera overlay accents. Kept independent of buttonColor for backwards compatibility; set both to apply a single brand color. |
| onPrimaryColor | UIColor? | The color of content rendered on top of primaryColor surfaces, such as loading spinners. |
| surfaceColor | UIColor? | The background color of surface components: bottom sheet containers and toast messages. |
| onSurfaceColor | UIColor? | The color of text rendered on top of surfaceColor components. |
| backgroundColor | UIColor? | The full-screen background color of SDK screens. |
| errorColor | UIColor? | The error accent color, such as the stop-recording button. |
| successColor | UIColor? | The success accent color, such as approve buttons. |
| textPrimaryColor | UIColor? | The color of primary standalone texts, such as the hologram countdown timer. |
| textSecondaryColor | UIColor? | The color of secondary hint texts, such as the video record description. Kept independent of bulletTextColor for backwards compatibility. |
| lineButtonTextColor | UIColor? | The text color of outlined ("line") buttons. Kept independent of primaryColor because outlined buttons sit on a transparent surface. |
ShapesConfig Properties
| Parameter | Type | Description |
|---|---|---|
| buttonCornerRadius | Int? | Sets the corner radius of buttons. |
| cardCornerRadius | Int? | Sets the corner radius of in-screen warning cards and hint boxes. |
| imageFrameCornerRadius | Int? | Sets the corner radius of image and animation frames. |
| bottomSheetCornerRadius | Int? | Sets the corner radius of the top edges of bottom sheets. |
TextConfig Properties
| Parameter | Type | Description |
|---|---|---|
| approveButtonText | String? | Text of the approve button shown after a photo is captured or a video is recorded. |
| retakeButtonText | String? | Text of the retake button shown after a photo is captured or a video is recorded. |
| startButtonText | String? | Text of the "start recording" button on the video record screen. |
| stopButtonText | String? | Text of the "stop recording" button on the video record screen. |
These texts apply across the SDK. To show a different text for a specific step, use setApproveButtonText, setRetakeButtonText, setStartButtonText, and setStopButtonText on StepBuilder; they override the TextConfig values.
TypographyConfig Properties
| Parameter | Type | Description |
|---|---|---|
| fontFamily | String? | Specifies the font family name to be used throughout the SDK. Example: "Inter", "Inter-Regular", "Roboto". |
| titleFontSize | CGFloat | Specifies the font size to be used in title texts. Default value: 28. |
| bodyFontSize | CGFloat | Specifies the font size to be used in body texts. Default value: 16. |
| buttonFontSize | CGFloat | Specifies the font size to be used in button texts. Default value: 16. |
| labelFontSize | CGFloat | Specifies the font size to be used in small helper label texts and light condition warnings. Default value: 14. |
| timerFontSize | CGFloat | Specifies the font size to be used in timer texts. Default value: 32. |
| promptFontSize | CGFloat | Specifies the font size of the text to be read aloud in the video record step. Default value: 16. |
| titleFontWeight | Int | Specifies the font weight to be used in title texts. Supported values: 100, 400, 500, 700, 900. Default value: 700. |
| bodyFontWeight | Int | Specifies the font weight to be used in body, label, and button texts. Supported values: 100, 400, 500, 700, 900. Default value: 400. |
| promptFontWeight | Int | Specifies the font weight of the text to be read aloud in the video record step. Default value: 600. |
UIConfig Usage Example
let colorsConfig = ColorsConfig(buttonColor: UIColor(named: "purple_700"),
buttonTextColor: .white,
bulletTextColor: UIColor(named: "teal_700"),
titleColor: .label,
descriptionColor: .secondaryLabel,
primaryColor: UIColor(named: "purple_700"),
onPrimaryColor: .white,
surfaceColor: .systemBackground,
onSurfaceColor: .label,
backgroundColor: .systemBackground,
errorColor: .systemRed,
successColor: .systemGreen,
textPrimaryColor: .label,
textSecondaryColor: .secondaryLabel,
lineButtonTextColor: UIColor(named: "purple_700")
)
let shapesConfig = ShapesConfig(buttonCornerRadius: 30,
cardCornerRadius: 12,
imageFrameCornerRadius: 16,
bottomSheetCornerRadius: 24
)
let typographyConfig = TypographyConfig(fontFamily: "Inter",
titleFontSize: 28,
bodyFontSize: 16,
buttonFontSize: 16,
labelFontSize: 14,
timerFontSize: 32,
promptFontSize: 16,
titleFontWeight: 700,
bodyFontWeight: 400,
promptFontWeight: 600
)
let uiConfig = UIConfig(colors: colorsConfig,
typography: typographyConfig,
shapes: shapesConfig,
bulletIconName: "bullet_icon",
textConfig: TextConfig(approveButtonText: "Approve",
retakeButtonText: "Retake",
startButtonText: "Start Recording",
stopButtonText: "Stop Recording")
)
Usage with KYCManagerConfigBuilder
let configuration = KYCManagerConfigBuilder()
.setCameraErrorMessage([
.CAMERA_PERMISSION_DENIED: "Camera permission was not granted. Please allow camera access."
])
.setShowCompletedScreen(true)
.setVideoCallSplashScreenAssetName("IdCard")
.setVideoCallExternalLogoImage(UIImage(named: "IdCard"))
.setTTSConfig(defaultTTSConfig)
.setUIConfig(UIConfig(colors: ColorsConfig(buttonColor: .systemPink,
buttonTextColor: .white,
bulletTextColor: .black),
typography: TypographyConfig(fontFamily: "Luculine",
titleFontSize: 28,
bodyFontSize: 27,
buttonFontSize: 16,
labelFontSize: 14,
timerFontSize: 32,
promptFontSize: 16,
titleFontWeight: 700,
bodyFontWeight: 400,
promptFontWeight: 600),
shapes: ShapesConfig(buttonCornerRadius: 24),
bulletIconName: "bullet_icon",
textConfig: TextConfig(approveButtonText: "Approve",
retakeButtonText: "Retake")))
.build()
TTSConfig
Configures the text-to-speech behavior used at the beginning of steps and for liveness instructions. Provided through KYCManagerConfigBuilder.setTTSConfig(_:).
TTSConfig Properties
| Parameter | Type | Description |
|---|---|---|
| isEnabled | Bool | Indicates whether text-to-speech is enabled. Default: true. |
| language | String | BCP-47 language code used to pick the default voice when voiceIdentifier is not found. Examples: "tr-TR", "en-US", "ru-RU". Default: "tr-TR". |
| voiceIdentifier | String? | Preferred AVSpeechSynthesisVoice identifier. If the voice is installed on the device it is used directly; otherwise the default voice for language is used. Default: nil. |
| speechRate | Float | Speech speed. Range: 0.0 – 1.0. Default: 0.5. Lower values such as 0.4 improve clarity for non-native voices (e.g. the Russian compact voice). |
| volume | Float | Output volume. Range: 0.0 (silent) – 1.0 (full). Default: 1.0. |
| pitchMultiplier | Float | Voice pitch. Range: 0.5 (deeper) – 2.0 (higher). Values outside this range are clamped by iOS. Default: 1.0. |
| preUtteranceDelay | TimeInterval | Silence inserted before the utterance begins (seconds). Default: 0.0. |
| postUtteranceDelay | TimeInterval | Silence inserted after the utterance finishes (seconds). Default: 0.0. |
let ttsConfig = TTSConfig(
isEnabled: true,
language: "en-US",
speechRate: 0.5,
volume: 1.0,
pitchMultiplier: 1.0,
preUtteranceDelay: 0.0,
postUtteranceDelay: 0.0
)
WarningConfig
Controls whether the lighting-related warning toasts are shown and what text they use. The two warnings are configured separately:
| Configuration | When it is shown |
|---|---|
setOverexposureWarning(_:) | When the captured image is overexposed or there is excessive light reflection on the ID card. |
setLowLightWarning(_:) | When the environment lighting is too low to detect facial movements during the liveness step. |
| Case | Description |
|---|---|
.enabled(message: String?) | Enables the warning. If no message is provided, the SDK's own localized text is shown. |
.disabled | Disables the warning so it is not shown to the user. This is the default behavior. |
let configuration = KYCManagerConfigBuilder()
.setOverexposureWarning(.enabled(message: "The environment is too bright, please reduce the light."))
.setLowLightWarning(.enabled())
.build()
CompletedScreenTexts
Customizes the texts of the success screen shown at the end of the flow when showCompletedScreen is enabled. Fields that are not provided fall back to the SDK's localized defaults.
| Parameter | Type | Description |
|---|---|---|
| titleText | String? | Main heading on the success screen. |
| descriptionText | String? | Body text shown below the image. |
| buttonText | String? | Label of the confirmation button. |
let completedTexts = CompletedScreenTexts(
titleText: "You're all set",
descriptionText: "Your identity verification request has been received successfully.",
buttonText: "OK"
)
KYCManagerConfig
Determines the general behavior, error messages, and UI configuration of the KYC flow.
KYCManagerConfig Parameters
| Parameter | Type | Description |
|---|---|---|
| language | String | The language of the SDK's own texts. Supported values: "tr", "en", "ru". Default: "tr". |
| uiConfig | UIConfig? | Customizes the colors, typography, shapes, and texts across the SDK. |
| showCompletedScreen | Bool | Controls whether the success screen is shown when the flow completes successfully. Default: false. |
| completedScreenTexts | CompletedScreenTexts? | Customizes the title, description, and button texts of the success screen. |
| livenessConfig | LivenessConfig? | Customizes the instructions and visual style of the Liveness step. |
| ttsConfig | TTSConfig? | Customizes the text-to-speech behavior. |
| videoCallSplashScreenAssetName | String? | Asset name of the full-screen image displayed when the video call screen opens. |
| videoCallExternalLogoImage | UIImage? | Logo displayed on the video call screen. |
| closeIconAssetName | String? | Asset name of the close button on Info screens. |
| overexposureWarningConfig | WarningConfig | Configuration of the overexposure / glare warning. Default: .disabled. |
| lowLightWarningConfig | WarningConfig | Configuration of the low-light warning in the Liveness step. Default: .disabled. |
| securityCheckEnabled | Bool | Enables jailbreak / simulator / debugger / hooking detection. Default: false. |
| cameraErrorMessage | [TeydexError.CameraSourceError: String]? | Custom message dictionary for camera errors. |
| nfcErrorMessage | [TeydexError.NFCError: String]? | Custom message dictionary for NFC errors. |
| videoCallErrorMessage | [TeydexError.VideoCallError: String]? | Custom message dictionary for video call errors. |
| videoRecordErrorMessage | [TeydexError.VideoRecordError: String]? | Custom message dictionary for video record errors. |
| timeOutErrorMessage | [TeydexError.TimeOutError: String]? | Custom message dictionary for timeout errors. |
| serverErrorMessage | [TeydexError.ServerError: String]? | Custom message dictionary for server errors. |
| rejectedErrorMessage | [TeydexError.RejectedError: String]? | Custom message dictionary for rejection errors. |
| identityReadFailedError | [TeydexError.IdentityReadFailedError: String]? | Custom message dictionary for identity read errors. |
| documentAutoDetectError | [TeydexError.DocumentAutoDetectError: String]? | Custom message dictionary for document auto-detection errors. |
KYCManagerConfigBuilder Methods
KYCManagerConfig can also be created directly, but the recommended approach is to use KYCManagerConfigBuilder. All setters are chainable and the configuration is finalized with build().
| Method | Corresponding property |
|---|---|
setLanguage(_:) | language |
setUIConfig(_:) | uiConfig |
setShowCompletedScreen(_:) | showCompletedScreen |
setCompletedScreenTexts(_:) | completedScreenTexts |
setLivenessConfig(_:) | livenessConfig |
setTTSConfig(_:) | ttsConfig |
setVideoCallSplashScreenAssetName(_:) | videoCallSplashScreenAssetName |
setVideoCallExternalLogoImage(_:) | videoCallExternalLogoImage |
setCloseIconAssetName(_:) | closeIconAssetName |
setOverexposureWarning(_:) | overexposureWarningConfig |
setLowLightWarning(_:) | lowLightWarningConfig |
setSecurityCheckEnabled(_:) | securityCheckEnabled |
setCameraErrorMessage(_:) | cameraErrorMessage |
setNFCErrorMessage(_:) | nfcErrorMessage |
setVideoCallErrorMessage(_:) | videoCallErrorMessage |
setVideoRecordErrorMessage(_:) | videoRecordErrorMessage |
setTimeOutErrorMessage(_:) | timeOutErrorMessage |
setServerErrorMessage(_:) | serverErrorMessage |
setRejectedErrorMessage(_:) | rejectedErrorMessage |
setIdentityReadFailedError(_:) | identityReadFailedError |
setDocumentAutoDetectMessage(_:) | documentAutoDetectError |
setNetworkErrorMessage(_:) | Network error messages (only read through onError) |
setPermissionErrorMessage(_:) | Permission error messages (only read through onError) |
setSecurityErrorMessage(_:) | Security error messages (only read through onError) |
Security Check (Jailbreak / Hook Detection)
When setSecurityCheckEnabled(true) is called, the SDK performs jailbreak, simulator, debugger, and hooking (Frida, Cydia Substrate, etc.) detection. The check is disabled by default and does not run at all unless opted into.
Every time the check runs — whether the device is clean or not — it emits exactly one event through onEvent. This makes it possible to distinguish "the check never ran" from "the check ran and the device is clean":
| State | Event | Additional behavior |
|---|---|---|
| Clean device | LogState.securityCheckPassed (SECURITY_CHECK_PASSED) | The flow continues normally. |
| Compromised device | LogState.securityWarning (SECURITY_WARNING) | The flow is stopped with a fail screen; onError and onProcessFinished(.failed(...)) are triggered. |
let configuration = KYCManagerConfigBuilder()
.setSecurityCheckEnabled(true)
.setSecurityErrorMessage([.DEVICE_COMPROMISED: "Your device is not secure. Please try again on a different device."])
.build()
The blocking behavior depends on the distributed KYCFramework.xcframework being compiled in Release. Since the published xcframework is always built in Release, blocking on compromised devices is always active regardless of the consuming app's own Debug/Release scheme.
KYCManagerConfig Usage
let configuration = KYCManagerConfigBuilder()
.setCameraErrorMessage([.CAMERA_PERMISSION_DENIED: "Camera permission denied"])
.setNFCErrorMessage([.DEVICE_NOT_HAVE_NFC: "Your device does not have NFC"])
.setShowCompletedScreen(true)
.setVideoCallSplashScreenAssetName("splash_background")
.setCloseIconAssetName("close_icon")
.setLivenessConfig(livenessConfig)
.setUIConfig(uiConfig)
.setTTSConfig(TTSConfig(isEnabled: true, speechRate: 0.5, language: "tr-TR"))
.setVideoCallExternalLogoImage(UIImage(named: "your_logo") ?? UIImage())
.build()
Localization
The SDK supports its own interface texts in three languages. The language is selected with setLanguage and defaults to "tr".
| Language | Code |
|---|---|
| Turkish | "tr" |
| English | "en" |
| Russian | "ru" |
let configuration = KYCManagerConfigBuilder()
.setLanguage("ru")
.build()
Texts Localized by the SDK
setLanguage only affects the texts produced by the SDK itself:
- Error titles and messages (camera, NFC, server, timeout, etc.)
- Camera permission screen titles and buttons
- Liveness instruction texts (up, down, left, right, center your face, etc.)
- NFC reading screen messages
- Connection error screen
- Success and cancellation screens
- SDK buttons such as "OK", "Allow", "Cancel", "Retake", "Approve"
Texts the Integrator Is Responsible For
The following texts are supplied by the integrator and are therefore not affected by setLanguage; you need to manage them with your own localization infrastructure:
- Title, description, bullet, and button texts provided through
InfoPresentationModelBuilder - Step titles provided through
StepBuilder.setTitle() - Glare / brightness warning texts on
StepBuilder - NFC texts overridden through
NFCTextConfig - Liveness texts overridden through
LivenessConfig - Success screen texts overridden through
CompletedScreenTexts - Text-to-speech content
KYCManagerDelegate
The delegate protocol used to handle events and errors during the KYC process.
import KYCFramework
class ViewController: UIViewController, KYCManagerDelegate {
func onProcessFinished(_ result: KYCProcessResult) {
// Called once when the KYC flow ends for any reason.
switch result {
case .successful:
print("KYC process completed successfully")
case .failed(let step, let reason):
print("KYC failed — step: \(String(describing: step)), reason: \(reason)")
case .cancelled(let step, let reason):
print("KYC cancelled — step: \(String(describing: step)), reason: \(reason)")
}
}
func onCompletion(_ isSuccess: Bool) {
// You can listen to whether the identity verification step was successful through this function.
if isSuccess {
print("KYC process completed successfully")
} else {
print("KYC process failed")
}
}
// The onEvent and onError functions allow you to handle which steps were opened,
// which operations were performed, and the error states that occurred during the identity verification process.
// These functions provide the necessary information for logging to platforms such as Countly and Firebase.
func onEvent(_ event: LogState) {
print("KYC Event: \(event)")
}
func onError(_ error: TeydexError) {
print("KYC Error: \(error)")
}
override func viewDidLoad() {
super.viewDidLoad()
TeydexSDK.shared.kycManager.delegate = self
}
}
Events (LogState)
Events produced throughout the flow are delivered to the integrator through KYCManagerDelegate.onEvent(_ event: LogState). These events can be used for logging to platforms such as Countly and Firebase. LogState carries a String raw value; the second column of each table is that value.
Step Events
| Case | Raw value |
|---|---|
idCardFrontStepOpened | ID_CARD_FRONT_STEP_OPENED |
idCardBackStepOpened | ID_CARD_BACK_STEP_OPENED |
idCardHologramStepOpened | ID_CARD_HOLOGRAM_STEP_OPENED |
idCardNfcStepOpened | ID_CARD_NFC_STEP_OPENED |
idCardLivenessStepOpened | ID_CARD_LIVENESS_STEP_OPENED |
passportStepOpened | PASSPORT_STEP_OPENED |
ruPassportAddressValidationStepOpened | RU_PASSPORT_ADDRESS_VALIDATION_STEP_OPENED |
videoCallStepOpened | VIDEO_CALL_STEP_OPENED |
videoRecordStepOpened | VIDEO_RECORD_STEP_OPENED |
selfieStepOpened | SELFIE_STEP_OPENED |
kpsStepOpened | KPS_STEP_OPENED |
stepSkipped | STEP_SKIPPED |
Flow State Events
| Case | Raw value |
|---|---|
kycCompleted | KYC_COMPLETED |
kycFailed | KYC_FAILED |
kycCancelled | KYC_CANCELLED |
kycClosed | KYC_CLOSED |
kycRetry | KYC_RETRY |
kycMaxRetryReached | KYC_MAX_RETRY_REACHED |
kycCloseButtonClicked | KYC_CLOSE_BUTTON_CLICKED |
kycNfcCloseButtonClicked | KYC_NFC_CLOSE_BUTTON_CLICKED |
kycVideoCallClosed | KYC_VIDEO_CALL_CLOSED |
Permission and Security Events
| Case | Raw value |
|---|---|
cameraPermissionGranted | CAMERA_PERMISSION_GRANTED |
microphonePermissionGranted | MICROPHONE_PERMISSION_GRANTED |
securityCheckPassed | SECURITY_CHECK_PASSED |
securityWarning | SECURITY_WARNING |
Document Detection Events
| Case | Raw value |
|---|---|
scanningDetectionTooDark | SCANNING_DETECTION_TOO_DARK |
scanningDetectionTooBright | SCANNING_DETECTION_TOO_BRIGHT |
scanningDetectionGlareDetected | SCANNING_DETECTION_GLARE_DETECTED |
scanningDetectionGlareNotDetected | SCANNING_DETECTION_GLARE_NOT_DETECTED |
scanningDetectionMultipleDocumentsDetected | SCANNING_DETECTION_MULTIPLE_DOCUMENTS_DETECTED |
scanningDetectionUnknownError | SCANNING_DETECTION_UNKNOWN_ERROR |
Other Events
| Case | Raw value |
|---|---|
hologramVideoIsSaved | HOLOGRAM_VIDEO_IS_SAVED |
hologramRetry | HOLOGRAM_RETRY |
nfcMrzContent | NFC_MRZ_CONTENT |
mrzDataNotFound | MRZ_DATA_NOT_FOUND |
processNfcIntentHasFailed | PROCESS_NFC_INTENT_HAS_FAILED |
joinVideoCallQue | JOIN_QUEUE |
videoCallStartFailed | VIDEO_CALL_START_FAILED |
imageCompressFailed | IMAGE_COMPRESS_FAILED |
imageNotFound | IMAGE_NOT_FOUND |
convertDateFailed | CONVERT_DATE_FAILED |
onError Closure
In addition to the delegate, errors can also be observed with a closure. KYCManager.onError works independently of the delegate's onError(_:) method; you can use both together.
TeydexSDK.shared.kycManager.onError = { error in
print("KYC Error: \(error.title) — \(error.message)")
}
dismissKYC
Used to programmatically close the KYC flow from outside the SDK. When called, the onProcessFinished delegate method is triggered with .cancelled(reason: .programmatic).
onProcessFinished
Reports the result of the KYC flow with three cases:
| Case | Description |
|---|---|
.successful | All steps completed successfully. |
.failed(stepName: String?, reason: String) | Flow ended due to an error at the specified step. |
.cancelled(stepName: String?, reason: KYCCancelReason) | Flow was cancelled. The reason is reported with KYCCancelReason. |
KYCCancelReason
| Case | Description |
|---|---|
.userRequested | The user pressed the close/cancel button inside the KYC flow. |
.programmatic | The integrator closed the flow by calling dismissKYC(). |
.serverCancelled | The server reported the transaction as cancelled. |
kycManager.dismissKYC()
Starting the KYC Flow
enterKYC Function
TeydexSDK.shared.kycManager.enterKYC(
from: viewController, // UIViewController or UINavigationController
clientToken: token, // Unique token for authentication
applicationId: applicationId, // Application ID for authentication
stepList: stepList, // List of steps
configuration: configuration, // KYCManagerConfig (optional)
initializeUrl: "https://your.api.domain.com/api/v1", // API base URL
videoCallUrl: "https://your.videocall.domain.com/api/v1", // Video call service URL
roomName: nil, // Video call room name (optional). Default: nil
useLocation: false // Should location data be recorded? Default: false
)
| Parameter | Type | Description |
|---|---|---|
| from | UIViewController | The screen the flow is started from. |
| clientToken | String | Unique token created for authentication. |
| applicationId | String | Application ID created for authentication. |
| stepList | [Step] | The list of step configurations. |
| configuration | KYCManagerConfig? | SDK configuration. Optional. |
| initializeUrl | String | API base URL. Example: "https://your.domain.com/api/v1". |
| videoCallUrl | String | Base URL of the video call services. |
| roomName | String? | Room name used as the appointment identifier in video call requests. Default: nil. |
| useLocation | Bool | Whether location data is recorded. Default: false. When true, the location keys must be defined in Info.plist. |
Important: The
fromparameter must be given aUINavigationControlleror aUIViewControllerthat has anavigationController.
The older enterKYC(clientToken:...) signature, which does not take a from parameter, is deprecated. New integrations should use enterKYC(from:...).
Certificate Pinning
To use certificate pinning on the network requests made by the SDK, call setPinnedCertificate before starting the flow. The certificate can be loaded from a remote URL or from a file embedded in the app bundle.
// With a certificate embedded in the bundle
TeydexSDK.shared.kycManager.setPinnedCertificate(orEmbeddedFile: "your_certificate", isPEM: false)
// From a remote URL
TeydexSDK.shared.kycManager.setPinnedCertificate(from: URL(string: "https://your.domain.com/cert.der"))
| Parameter | Type | Description |
|---|---|---|
| from | URL? | URL the certificate is downloaded from. |
| orEmbeddedFile | String? | Name of the certificate file embedded in the app bundle. |
| isPEM | Bool | Whether the certificate is in PEM format. Default: false (DER). |
Full Configuration Example
class KYCConfig {
// Front Info
static let frontInfo = InfoPresentationModelBuilder()
.setButtonText("Continue")
.setDescriptionText("Please follow the steps below carefully")
.setTitleText("Front Side")
.setBullets(["Hold the front of your ID parallel to the phone screen. The ID should be positioned so that it fits exactly within the template shown on screen.",
"Make sure all the information on the ID is clearly visible. The ID details should not be blurry and must be easy to read."])
.setCancelButtonIsActive(true)
.build()
// Back Info
static let backInfo = InfoPresentationModelBuilder()
.setButtonText("Continue")
.setDescriptionText("Please follow the steps below carefully")
.setTitleText("Back Side")
.setBullets(["Hold the back of your ID parallel to the phone screen. The ID should be positioned so that it fits exactly within the template shown on screen.",
"Make sure all the information on the ID is clearly visible. The ID details should not be blurry and must be easy to read."])
.setCancelButtonIsActive(true)
.build()
// NFC Info
static let nfcInfo = InfoPresentationModelBuilder()
.setButtonText("Continue")
.setDescriptionText("Please follow the steps below carefully")
.setTitleText("NFC")
.setBullets(["Make sure NFC is enabled on your phone. NFC can be turned on from your phone's settings.",
"Touch the NFC-compatible area of your ID to the back of your phone. Keep the distance between the ID and the phone as short as possible.",
"Wait for your ID data to be transferred to your phone successfully. Once your phone picks up the NFC signal, a notification should appear on your screen indicating that the verification process has started."])
.setCancelButtonIsActive(true)
.build()
// Liveness Info
static let faceInfo = InfoPresentationModelBuilder()
.setButtonText("Continue")
.setDescriptionText("Please follow the steps below carefully")
.setTitleText("Liveness")
.setBullets(["Look directly at your device's camera and make sure your face is clearly visible on screen. Following the instructions on your device's screen, you may need to move your head in a specific way.",
"Following the prompts on screen, you may turn your head right, left, up, and down. Remember that your face needs to look natural and lifelike."])
.setCancelButtonIsActive(true)
.build()
// Hologram Info
static let hologramInfo = InfoPresentationModelBuilder()
.setButtonText("Continue")
.setDescriptionText("Please follow the steps below carefully")
.setTitleText("Hologram")
.setBullets(["Position the front of your ID clearly within the time shown on screen. You need to properly capture the bright reflection of the hologram label on your ID.",
"Make sure you can see your ID details clearly. Ensure there is enough light and that all the information on the ID is distinct so it can be captured."])
.setCancelButtonIsActive(true)
.build()
// VideoCall Info
static let videoCallInfo = InfoPresentationModelBuilder()
.setButtonText("Continue")
.setDescriptionText("Get ready to scan your face and move to a well-lit area.")
.setTitleText("Video Call")
.setBullets(["Make sure your device's camera and microphone are working.",
"Make sure you have enough light so that your face is clearly visible."])
.setCancelButtonIsActive(true)
.build()
// VideoRecord Info
static let videoRecordInfo = InfoPresentationModelBuilder()
.setButtonText("Continue")
.setDescriptionText("Create a video recording by reading the on-screen text aloud.")
.setTitleText("Voice Video Verification")
.setBullets(["Make sure your face is centered and clearly visible in the camera frame.",
"Read the on-screen text aloud and clearly while recording."])
.setCancelButtonIsActive(true)
.build()
// Steps
static let idFrontStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("ID Front Side")
.setInfoView(frontInfo)
.setStepType(.idcardFront)
.setStepInformationTextToSpeech("Hold the front of your ID parallel to the phone screen. The ID must be placed exactly within the template.")
.setIsGlareDetectionEnable(true)
.setGlareDetectedText("There is glare. Please hold the document at a different angle.")
.setTooBrightText("The environment is too bright. Please reduce the light.")
.setTooDarkText("The environment is too dark. Please move to a brighter area.")
.setMultipleDocumentsDetectedText("Show only a single document.")
.build()
static let idBackStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Back Side")
.setInfoView(backInfo)
.setStepType(.idcardBack)
.setStepInformationTextToSpeech("Hold the back of your ID parallel to the phone screen. Make sure all the information is clearly visible.")
.setIsGlareDetectionEnable(true)
.setGlareDetectedText("There is glare. Please hold the document at a different angle.")
.setTooBrightText("The environment is too bright. Please reduce the light.")
.setTooDarkText("The environment is too dark. Please move to a brighter area.")
.setMultipleDocumentsDetectedText("Show only a single document.")
.build()
static let nfcStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("NFC")
.setInfoView(nfcInfo)
.setStepType(.nfc)
.setStepInformationTextToSpeech("Bring your ID close to the back of your phone. Make sure NFC is enabled.")
.build()
static let faceStep = LivenessStepBuilder()
.setDirectionTextToSpeech(
center: "Hold your face in the center of the frame and look straight ahead.",
right: "Turn your face to the right.",
left: "Turn your face to the left.",
up: "Turn your face up.",
down: "Turn your face down."
)
.setIdentifyTimeout(35)
.setTitle("Liveness Check")
.setInfoView(faceInfo)
.setStepInformationTextToSpeech("Look at the camera and place your face in the frame. Move your head according to the prompts.")
.setIsGlareDetectionEnable(true)
.setTooBrightText("The environment is too bright. Please reduce the light.")
.setTooDarkText("The environment is too dark. Please move to a brighter area.")
.build()
static let hologramStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Hologram")
.setInfoView(hologramInfo)
.setStepType(.hologram)
.setStepInformationTextToSpeech("Scan the hologram label on your ID. The hologram should appear bright.")
.build()
static let videoCall = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Video Call")
.setInfoView(videoCallInfo)
.setStepType(.videoCall)
.setStepInformationTextToSpeech("Starting the video call. Make sure there is enough light.")
.build()
static let videoRecordStep = StepBuilder()
.setIdentifyTimeout(35)
.setTitle("Voice Video Verification")
.setInfoView(videoRecordInfo)
.setStepType(.videoRecord)
.setStepInformationTextToSpeech("Create a video recording by reading the on-screen text aloud.")
.setStartButtonText("Start Recording")
.setStopButtonText("Stop Recording")
.setApproveButtonText("Approve")
.setRetakeButtonText("Retake")
.setVideoRecordDuration(30)
.build()
// Text to Speech Configuration
static let defaultTTSConfig = TTSConfig(
isEnabled: true,
language: "en-US",
speechRate: 0.5,
volume: 1.0,
pitchMultiplier: 1.0,
preUtteranceDelay: 0.0,
postUtteranceDelay: 0.0
)
// Configuration
static let configuration = KYCManagerConfigBuilder()
.setLanguage("en")
.setCameraErrorMessage([
.CAMERA_PERMISSION_DENIED: "Camera permission denied. Please grant camera permission."
])
.setShowCompletedScreen(true)
.setCompletedScreenTexts(CompletedScreenTexts(titleText: "You're all set",
descriptionText: "Your identity verification request has been received successfully.",
buttonText: "OK"))
.setOverexposureWarning(.enabled(message: "The environment is too bright, please reduce the light."))
.setLowLightWarning(.enabled())
.setSecurityCheckEnabled(true)
.setVideoCallSplashScreenAssetName("IdCard")
.setVideoCallExternalLogoImage(UIImage(named: "IdCard"))
.setTTSConfig(defaultTTSConfig)
.setUIConfig(UIConfig(colors: ColorsConfig(buttonColor: .systemPink,
buttonTextColor: .white,
bulletTextColor: .black),
typography: TypographyConfig(fontFamily: "Luculine",
titleFontSize: 28,
bodyFontSize: 27,
buttonFontSize: 16,
labelFontSize: 14,
timerFontSize: 32,
promptFontSize: 16,
titleFontWeight: 700,
bodyFontWeight: 400,
promptFontWeight: 600),
shapes: ShapesConfig(buttonCornerRadius: 24),
textConfig: TextConfig(approveButtonText: "Approve",
retakeButtonText: "Retake")))
.build()
// Helper functions
static func getStepList() -> [Step] {
return [idFrontStep, idBackStep, hologramStep, nfcStep, faceStep, videoCall, videoRecordStep]
}
static func getManagerConfig() -> KYCManagerConfig {
return configuration
}
}
Error Management
The error types that can come from the SDK are listed below. All errors are communicated via the onError(_ error: TeydexError) method of KYCManagerDelegate. Error messages can be customized via KYCManagerConfigBuilder.
Readable Fields of the Error Object
TeydexError conforms to the KYCBaseError protocol. When you want to present your own error UI, you can read the following fields directly:
| Field | Type | Description |
|---|---|---|
title | String | The localized title of the error. |
message | String | The localized message of the error. If it was overridden through KYCManagerConfigBuilder, the overridden value is returned. |
extraDetail | String? | Additional technical detail when available (e.g. the related endpoint or a system error string). nil for most errors. |
Since KYCBaseError derives from LocalizedError, errorDescription (returns message) and failureReason (returns title) are also available.
func onError(_ error: TeydexError) {
showAlert(title: error.title, message: error.message)
if let detail = error.extraDetail {
analytics.log(detail)
}
}
Camera Errors (TeydexError.CameraSourceError)
| Case | Description |
|---|---|
CAMERA_PERMISSION_DENIED | Camera permission was denied. |
CAMERA_PERMISSION_PERMANENTLY_DENIED | Camera permission was permanently denied. |
CAMERA_NOT_FOUND | No camera was found on the device. |
CAMERA_CONFIGURATION_FAILED | The camera could not be configured or the preview could not be created. |
CAPTURE_PHOTO_FAILED | An error occurred while capturing the photo. |
VIDEO_RECORDING_FAILED | An error occurred while recording the video. |
VIDEO_DELETE_FAILED | The temporary video could not be deleted. |
FLASH_TOGGLE_FAILED | Toggling the flash failed. |
FACE_DETECTION_FAILED | Face detection failed. |
APP_WENT_BACKGROUND | The process was interrupted because the app went to the background. |
UNKNOWN | Unknown camera error. |
NFC Errors (TeydexError.NFCError)
| Case | Description |
|---|---|
DEVICE_NOT_HAVE_NFC | The device has no NFC module. |
NFC_NOT_ENABLED | NFC is turned off. |
NFC_READ_FAILED | The ID data could not be read. |
TAG_LOST | The connection to the ID was lost during reading. |
TAG_NOT_SUPPORTED | The ID card is not supported. |
ISO_DEP_NOT_SUPPORTED | The NFC chip does not support the ISO-DEP protocol. |
CANT_CONNECT_NFC_TAG | Could not connect to the NFC tag. |
MORE_THAN_ONE_TAG_FOUND | More than one NFC tag was detected. |
WRONG_MRZ_STRING | The MRZ data could not be validated. |
CARD_AUTH_FAILED | Card authentication failed. |
PASSIVE_AUTH_FAILED | Passive authentication failed. |
ID_CARD_CAN_NOT_IDENTIFY | The ID card could not be identified. |
PHOTO_NOT_FOUND | The photo data could not be read from the chip. |
USER_CANCELED | The user cancelled the reading process. |
UNKNOWN | Unknown NFC error. |
Video Call Errors (TeydexError.VideoCallError)
| Case | Description |
|---|---|
CLOSED | The user closed the call. |
FAIL | The video call ended unsuccessfully. |
Video Record Errors (TeydexError.VideoRecordError)
| Case | Description |
|---|---|
TIME_OUT | The time allotted for the recording expired. |
RECORDING_FAILED | The video recording could not be completed. |
NO_DATA | No video data was produced at the end of the recording. |
Document Detection Errors (TeydexError.DocumentAutoDetectError)
| Case | Description |
|---|---|
MULTIPLE_DOCUMENTS_DETECTED | More than one document was detected by the camera. |
GLARE_DETECTED | Glare was detected on the document. |
GLARE_NOT_DETECTED | The expected reflection was not detected in the hologram step. |
TOO_BRIGHT | The environment is too bright. |
TOO_DARK | The environment is too dark. |
UNKNOWN | Unknown document detection error. |
Timeout Errors (TeydexError.TimeOutError)
| Case | Description |
|---|---|
TIME_OUT | The operation timed out. |
Server Errors (TeydexError.ServerError)
| Case | Description |
|---|---|
UNKNOWN | Unknown error while communicating with the server. |
UNEXPECTED | Unexpected server error. |
Rejection Errors (TeydexError.RejectedError)
| Case | Description |
|---|---|
REJECTED | The transaction was rejected. |
MAX_RETRY_COUNT_EXCEEDED | The maximum retry count was exceeded. |
Identity Read Errors (TeydexError.IdentityReadFailedError)
| Case | Description |
|---|---|
IDENTITY_READ_FAILED | The identity could not be read. |
Permission Errors (TeydexError.PermissionError)
| Case | Description |
|---|---|
RECORD_PERMISSION_DENIED(errorMessage: String) | Microphone / recording permission was denied. |
LOCATION_PERMISSION_DENIED | Location permission was denied. |
Security Errors (TeydexError.SecurityError)
| Case | Description |
|---|---|
DEVICE_COMPROMISED | Jailbreak, hooking, or a similar security violation was detected on the device. |
Network Errors (TeydexError.NetworkError)
| Case | Description |
|---|---|
REQUEST_FAILED(endpoint: String, errorMessage: String) | The request failed. |
REQUEST_FAILED_WITH_STATUS_CODE(endpoint: String, statusCode: Int) | The request returned an unsuccessful HTTP status code. |
DECODING_FAILED(endpoint: String, body: String) | The response could not be decoded. |
NO_DATA(endpoint: String) | The response body was empty. |
INVALID_RESPONSE_FORMAT(endpoint: String, body: String) | The response is not in the expected format. |
The PermissionError, SecurityError, and NetworkError families are never presented on screen by the SDK; they are only delivered to the integrator through onError. Their messages can be overridden with setPermissionErrorMessage, setSecurityErrorMessage, and setNetworkErrorMessage, and the overridden value is read through error.message.