Skip to main content
Version: 1.6.14

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.

PlatformMin version
iOSiOS 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

note

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

ParameterTypeDescription
setTitleTextStringSpecifies the title text to be displayed on the Info screen.
setDescriptionTextStringSpecifies the description text to be displayed on the Info screen.
setButtonTextStringSpecifies the text of the button that will start the step shown on the Info screen.
setAssetImageNameStringSpecifies the image to be shown on the Info screen.
setLottieFileNameStringSpecifies 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.
setCancelButtonIsActiveBoolEnables or disables the cancel button in the top-right corner of the Info screen. Disabled by default.
note

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:

ParameterTypeDescription
isGlareDetectionEnableBoolEnables glare detection for the relevant step. Default is true for Front and Back, false for Passport.
glareDetectedTextStringText displayed when glare is detected on the document.
tooBrightTextStringWarning text displayed when the environment is too bright.
tooDarkTextStringWarning text displayed when the environment is too dark.
multipleDocumentsDetectedTextStringWarning text displayed when multiple documents are detected by the camera.

The Liveness step only has parameters related to ambient lighting:

ParameterTypeDescription
isGlareDetectionEnableBoolEnables ambient light monitoring in the Liveness step. Default is false; it must be explicitly set to true for monitoring to run.
tooBrightTextStringWarning text displayed when the environment is too bright.
tooDarkTextStringWarning text displayed when the environment is too dark.
note

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

ParameterTypeDescription
setInfoViewInfoPresentationModel?Used to add an Info screen to the relevant step. Optional.
setTitleString?Represents the Toolbar text to be displayed in the relevant step.
setStepTypeTeydexConstants.KYCStep?Specifies the type of the step (.idcardFront, .idcardBack, etc.)
setStepInformationTextToSpeechString?Represents the text to be read aloud at the beginning of the step.
setIdentifyTimeoutTimeInterval?Sets the timeout duration for the relevant step. Default value is 30 seconds.
setIsGlareDetectionEnableBool?Enables glare detection.
setGlareDetectedTextString?Warning displayed when glare is detected.
setTooBrightTextString?Warning displayed when the environment is too bright.
setTooDarkTextString?Warning displayed when the environment is too dark.
setMultipleDocumentsDetectedTextString?Warning displayed when multiple documents are detected.
setCancelButtonIsActiveBoolControls whether the close button is shown at the top right of the capture screen for this step. Default false.
setApproveButtonTextString?Text of the approve button shown after capture. Overrides the global value from UIConfig.textConfig.
setRetakeButtonTextString?Text of the retake button shown after capture. Overrides the global value from UIConfig.textConfig.
setNFCTextConfigNFCTextConfig?Only relevant for .nfc steps; customizes the texts on the NFC reading screen.
note

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

ParameterTypeDescription
setDirectionTextToSpeechString, String, String, String, StringSets the text-to-speech message for center, right, left, up, down directions.

VideoRecord Step Properties

ParameterTypeDescription
setStartButtonTextString?Text for the button that starts recording.
setStopButtonTextString?Text for the button that stops recording.
setApproveButtonTextString?Text for the button used to approve the recording afterward.
setRetakeButtonTextString?Text for the button used to re-record afterward.
setVideoRecordDurationInt?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.

ParameterTypeDescription
successfulReadTextString?Text shown when NFC reading completes successfully.
scanDescriptionString?Instruction shown while prompting the user to hold the document near the phone.
retryDescriptionString?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: setGlareDetectedText and setMultipleDocumentsDetectedText are not supported in the Liveness step; only tooBrightText and tooDarkText are 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.

note

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, and readyCountdownMs, 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 typeDescription
.passportPassport 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.
.selfieStep in which a selfie photo is captured with the front camera. setApproveButtonText and setRetakeButtonText apply to this step.
.ruAddressValidationVerification step in which a photo of the address page of a Russian passport is captured.
.kpsIdentity 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.
note

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

ParameterTypeDescription
dotRadiusCGFloat?Specifies the radius of the dots displayed on screen during the liveness check.
dotColorUIColor?Defines the default color of the dots used as liveness indicators.
activeDotColorUIColor?Sets the color of the active dot during the liveness check.
titleTextString?The main title text displayed during the liveness check.
upTextString?Instruction text displayed when the user needs to move their head upward.
downTextString?Instruction text displayed when the user needs to move their head downward.
leftTextString?Instruction text displayed when the user needs to turn their head to the left.
rightTextString?Instruction text displayed when the user needs to turn their head to the right.
centerYourFaceTextString?Instruction text asking the user to center their face within the frame.
faceNotDetectedTextString?Message displayed when the user's face is not detected during the liveness check.
overlayTextString?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

ParameterTypeDescription
colorsColorsConfig?Used to configure the color settings for Info screens and bottom sheets.
typographyTypographyConfig?Used to configure the font family, font sizes, and font weights to be used throughout the SDK.
shapesShapesConfig?Used to configure the shape settings for Info screens and bottom sheets.
bulletIconNameString?Specifies the name of the icon used for bullet points in Info screens and bottom sheets.
textConfigTextConfig?Used to customize the button texts on the photo approval screen.

ColorsConfig Properties

ParameterTypeDescription
buttonColorUIColor?Specifies the background color of buttons.
buttonTextColorUIColor?Sets the text color of buttons.
bulletTextColorUIColor?Defines the color of bulleted texts.
titleColorUIColor?Defines the color of the title text on Info screens.
descriptionColorUIColor?Defines the color of the description text on Info screens.
primaryColorUIColor?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.
onPrimaryColorUIColor?The color of content rendered on top of primaryColor surfaces, such as loading spinners.
surfaceColorUIColor?The background color of surface components: bottom sheet containers and toast messages.
onSurfaceColorUIColor?The color of text rendered on top of surfaceColor components.
backgroundColorUIColor?The full-screen background color of SDK screens.
errorColorUIColor?The error accent color, such as the stop-recording button.
successColorUIColor?The success accent color, such as approve buttons.
textPrimaryColorUIColor?The color of primary standalone texts, such as the hologram countdown timer.
textSecondaryColorUIColor?The color of secondary hint texts, such as the video record description. Kept independent of bulletTextColor for backwards compatibility.
lineButtonTextColorUIColor?The text color of outlined ("line") buttons. Kept independent of primaryColor because outlined buttons sit on a transparent surface.

ShapesConfig Properties

ParameterTypeDescription
buttonCornerRadiusInt?Sets the corner radius of buttons.
cardCornerRadiusInt?Sets the corner radius of in-screen warning cards and hint boxes.
imageFrameCornerRadiusInt?Sets the corner radius of image and animation frames.
bottomSheetCornerRadiusInt?Sets the corner radius of the top edges of bottom sheets.

TextConfig Properties

ParameterTypeDescription
approveButtonTextString?Text of the approve button shown after a photo is captured or a video is recorded.
retakeButtonTextString?Text of the retake button shown after a photo is captured or a video is recorded.
startButtonTextString?Text of the "start recording" button on the video record screen.
stopButtonTextString?Text of the "stop recording" button on the video record screen.
note

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

ParameterTypeDescription
fontFamilyString?Specifies the font family name to be used throughout the SDK. Example: "Inter", "Inter-Regular", "Roboto".
titleFontSizeCGFloatSpecifies the font size to be used in title texts. Default value: 28.
bodyFontSizeCGFloatSpecifies the font size to be used in body texts. Default value: 16.
buttonFontSizeCGFloatSpecifies the font size to be used in button texts. Default value: 16.
labelFontSizeCGFloatSpecifies the font size to be used in small helper label texts and light condition warnings. Default value: 14.
timerFontSizeCGFloatSpecifies the font size to be used in timer texts. Default value: 32.
promptFontSizeCGFloatSpecifies the font size of the text to be read aloud in the video record step. Default value: 16.
titleFontWeightIntSpecifies the font weight to be used in title texts. Supported values: 100, 400, 500, 700, 900. Default value: 700.
bodyFontWeightIntSpecifies the font weight to be used in body, label, and button texts. Supported values: 100, 400, 500, 700, 900. Default value: 400.
promptFontWeightIntSpecifies 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

ParameterTypeDescription
isEnabledBoolIndicates whether text-to-speech is enabled. Default: true.
languageStringBCP-47 language code used to pick the default voice when voiceIdentifier is not found. Examples: "tr-TR", "en-US", "ru-RU". Default: "tr-TR".
voiceIdentifierString?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.
speechRateFloatSpeech speed. Range: 0.01.0. Default: 0.5. Lower values such as 0.4 improve clarity for non-native voices (e.g. the Russian compact voice).
volumeFloatOutput volume. Range: 0.0 (silent) – 1.0 (full). Default: 1.0.
pitchMultiplierFloatVoice pitch. Range: 0.5 (deeper) – 2.0 (higher). Values outside this range are clamped by iOS. Default: 1.0.
preUtteranceDelayTimeIntervalSilence inserted before the utterance begins (seconds). Default: 0.0.
postUtteranceDelayTimeIntervalSilence 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:

ConfigurationWhen 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.
CaseDescription
.enabled(message: String?)Enables the warning. If no message is provided, the SDK's own localized text is shown.
.disabledDisables 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.

ParameterTypeDescription
titleTextString?Main heading on the success screen.
descriptionTextString?Body text shown below the image.
buttonTextString?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

ParameterTypeDescription
languageStringThe language of the SDK's own texts. Supported values: "tr", "en", "ru". Default: "tr".
uiConfigUIConfig?Customizes the colors, typography, shapes, and texts across the SDK.
showCompletedScreenBoolControls whether the success screen is shown when the flow completes successfully. Default: false.
completedScreenTextsCompletedScreenTexts?Customizes the title, description, and button texts of the success screen.
livenessConfigLivenessConfig?Customizes the instructions and visual style of the Liveness step.
ttsConfigTTSConfig?Customizes the text-to-speech behavior.
videoCallSplashScreenAssetNameString?Asset name of the full-screen image displayed when the video call screen opens.
videoCallExternalLogoImageUIImage?Logo displayed on the video call screen.
closeIconAssetNameString?Asset name of the close button on Info screens.
overexposureWarningConfigWarningConfigConfiguration of the overexposure / glare warning. Default: .disabled.
lowLightWarningConfigWarningConfigConfiguration of the low-light warning in the Liveness step. Default: .disabled.
securityCheckEnabledBoolEnables 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().

MethodCorresponding 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":

StateEventAdditional behavior
Clean deviceLogState.securityCheckPassed (SECURITY_CHECK_PASSED)The flow continues normally.
Compromised deviceLogState.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()
note

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".

LanguageCode
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

CaseRaw value
idCardFrontStepOpenedID_CARD_FRONT_STEP_OPENED
idCardBackStepOpenedID_CARD_BACK_STEP_OPENED
idCardHologramStepOpenedID_CARD_HOLOGRAM_STEP_OPENED
idCardNfcStepOpenedID_CARD_NFC_STEP_OPENED
idCardLivenessStepOpenedID_CARD_LIVENESS_STEP_OPENED
passportStepOpenedPASSPORT_STEP_OPENED
ruPassportAddressValidationStepOpenedRU_PASSPORT_ADDRESS_VALIDATION_STEP_OPENED
videoCallStepOpenedVIDEO_CALL_STEP_OPENED
videoRecordStepOpenedVIDEO_RECORD_STEP_OPENED
selfieStepOpenedSELFIE_STEP_OPENED
kpsStepOpenedKPS_STEP_OPENED
stepSkippedSTEP_SKIPPED

Flow State Events

CaseRaw value
kycCompletedKYC_COMPLETED
kycFailedKYC_FAILED
kycCancelledKYC_CANCELLED
kycClosedKYC_CLOSED
kycRetryKYC_RETRY
kycMaxRetryReachedKYC_MAX_RETRY_REACHED
kycCloseButtonClickedKYC_CLOSE_BUTTON_CLICKED
kycNfcCloseButtonClickedKYC_NFC_CLOSE_BUTTON_CLICKED
kycVideoCallClosedKYC_VIDEO_CALL_CLOSED

Permission and Security Events

CaseRaw value
cameraPermissionGrantedCAMERA_PERMISSION_GRANTED
microphonePermissionGrantedMICROPHONE_PERMISSION_GRANTED
securityCheckPassedSECURITY_CHECK_PASSED
securityWarningSECURITY_WARNING

Document Detection Events

CaseRaw value
scanningDetectionTooDarkSCANNING_DETECTION_TOO_DARK
scanningDetectionTooBrightSCANNING_DETECTION_TOO_BRIGHT
scanningDetectionGlareDetectedSCANNING_DETECTION_GLARE_DETECTED
scanningDetectionGlareNotDetectedSCANNING_DETECTION_GLARE_NOT_DETECTED
scanningDetectionMultipleDocumentsDetectedSCANNING_DETECTION_MULTIPLE_DOCUMENTS_DETECTED
scanningDetectionUnknownErrorSCANNING_DETECTION_UNKNOWN_ERROR

Other Events

CaseRaw value
hologramVideoIsSavedHOLOGRAM_VIDEO_IS_SAVED
hologramRetryHOLOGRAM_RETRY
nfcMrzContentNFC_MRZ_CONTENT
mrzDataNotFoundMRZ_DATA_NOT_FOUND
processNfcIntentHasFailedPROCESS_NFC_INTENT_HAS_FAILED
joinVideoCallQueJOIN_QUEUE
videoCallStartFailedVIDEO_CALL_START_FAILED
imageCompressFailedIMAGE_COMPRESS_FAILED
imageNotFoundIMAGE_NOT_FOUND
convertDateFailedCONVERT_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:

CaseDescription
.successfulAll 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

CaseDescription
.userRequestedThe user pressed the close/cancel button inside the KYC flow.
.programmaticThe integrator closed the flow by calling dismissKYC().
.serverCancelledThe 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
)
ParameterTypeDescription
fromUIViewControllerThe screen the flow is started from.
clientTokenStringUnique token created for authentication.
applicationIdStringApplication ID created for authentication.
stepList[Step]The list of step configurations.
configurationKYCManagerConfig?SDK configuration. Optional.
initializeUrlStringAPI base URL. Example: "https://your.domain.com/api/v1".
videoCallUrlStringBase URL of the video call services.
roomNameString?Room name used as the appointment identifier in video call requests. Default: nil.
useLocationBoolWhether location data is recorded. Default: false. When true, the location keys must be defined in Info.plist.

Important: The from parameter must be given a UINavigationController or a UIViewController that has a navigationController.

warning

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"))
ParameterTypeDescription
fromURL?URL the certificate is downloaded from.
orEmbeddedFileString?Name of the certificate file embedded in the app bundle.
isPEMBoolWhether 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:

FieldTypeDescription
titleStringThe localized title of the error.
messageStringThe localized message of the error. If it was overridden through KYCManagerConfigBuilder, the overridden value is returned.
extraDetailString?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)

CaseDescription
CAMERA_PERMISSION_DENIEDCamera permission was denied.
CAMERA_PERMISSION_PERMANENTLY_DENIEDCamera permission was permanently denied.
CAMERA_NOT_FOUNDNo camera was found on the device.
CAMERA_CONFIGURATION_FAILEDThe camera could not be configured or the preview could not be created.
CAPTURE_PHOTO_FAILEDAn error occurred while capturing the photo.
VIDEO_RECORDING_FAILEDAn error occurred while recording the video.
VIDEO_DELETE_FAILEDThe temporary video could not be deleted.
FLASH_TOGGLE_FAILEDToggling the flash failed.
FACE_DETECTION_FAILEDFace detection failed.
APP_WENT_BACKGROUNDThe process was interrupted because the app went to the background.
UNKNOWNUnknown camera error.

NFC Errors (TeydexError.NFCError)

CaseDescription
DEVICE_NOT_HAVE_NFCThe device has no NFC module.
NFC_NOT_ENABLEDNFC is turned off.
NFC_READ_FAILEDThe ID data could not be read.
TAG_LOSTThe connection to the ID was lost during reading.
TAG_NOT_SUPPORTEDThe ID card is not supported.
ISO_DEP_NOT_SUPPORTEDThe NFC chip does not support the ISO-DEP protocol.
CANT_CONNECT_NFC_TAGCould not connect to the NFC tag.
MORE_THAN_ONE_TAG_FOUNDMore than one NFC tag was detected.
WRONG_MRZ_STRINGThe MRZ data could not be validated.
CARD_AUTH_FAILEDCard authentication failed.
PASSIVE_AUTH_FAILEDPassive authentication failed.
ID_CARD_CAN_NOT_IDENTIFYThe ID card could not be identified.
PHOTO_NOT_FOUNDThe photo data could not be read from the chip.
USER_CANCELEDThe user cancelled the reading process.
UNKNOWNUnknown NFC error.

Video Call Errors (TeydexError.VideoCallError)

CaseDescription
CLOSEDThe user closed the call.
FAILThe video call ended unsuccessfully.

Video Record Errors (TeydexError.VideoRecordError)

CaseDescription
TIME_OUTThe time allotted for the recording expired.
RECORDING_FAILEDThe video recording could not be completed.
NO_DATANo video data was produced at the end of the recording.

Document Detection Errors (TeydexError.DocumentAutoDetectError)

CaseDescription
MULTIPLE_DOCUMENTS_DETECTEDMore than one document was detected by the camera.
GLARE_DETECTEDGlare was detected on the document.
GLARE_NOT_DETECTEDThe expected reflection was not detected in the hologram step.
TOO_BRIGHTThe environment is too bright.
TOO_DARKThe environment is too dark.
UNKNOWNUnknown document detection error.

Timeout Errors (TeydexError.TimeOutError)

CaseDescription
TIME_OUTThe operation timed out.

Server Errors (TeydexError.ServerError)

CaseDescription
UNKNOWNUnknown error while communicating with the server.
UNEXPECTEDUnexpected server error.

Rejection Errors (TeydexError.RejectedError)

CaseDescription
REJECTEDThe transaction was rejected.
MAX_RETRY_COUNT_EXCEEDEDThe maximum retry count was exceeded.

Identity Read Errors (TeydexError.IdentityReadFailedError)

CaseDescription
IDENTITY_READ_FAILEDThe identity could not be read.

Permission Errors (TeydexError.PermissionError)

CaseDescription
RECORD_PERMISSION_DENIED(errorMessage: String)Microphone / recording permission was denied.
LOCATION_PERMISSION_DENIEDLocation permission was denied.

Security Errors (TeydexError.SecurityError)

CaseDescription
DEVICE_COMPROMISEDJailbreak, hooking, or a similar security violation was detected on the device.

Network Errors (TeydexError.NetworkError)

CaseDescription
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.
note

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.