SDK reference · iOS SDK

API Reference

This is the API reference for the Incode iOS SDK. It is the authoritative source for the IncdOnboarding public API: the IncdOnboardingManager singleton, its methods and parameters, the IncdOnboardingDelegate callbacks, and the result models returned to your app. All symbols below are taken directly from the SDK's public headers.


Current API Reference

The public API is reached through IncdOnboardingManager.shared and the IncdOnboardingDelegate you assign to it. Use the sections below for exact method signatures, parameter types, and result-model names. For step-by-step setup see Installation; for the ways to define and start a flow see Integration Approaches; for per-step capture/verification options see Modules. For anything not covered here or in the rest of this documentation, contact your customer success manager or Incode support.

Initialization

Initialize the SDK once before starting any flow:

public func initIncdOnboarding(
    url: String? = nil,
    e2eeURL: String? = nil,
    apiKey: String? = nil,
    clientExperimentId: String? = nil,
    loggingEnabled: Bool = true,
    testMode: Bool = false,
    _ completion: ((Bool?, IncdInitError?) -> Void)? = nil
)

The completion closure reports success (Bool?) and an IncdInitError? on failure.

Starting a Flow

Flows are started through the manager. There are several entry points, all documented with their full signatures and Swift examples in the Integration Approaches section.

  • startOnboarding: Start the default onboarding flow.
  • startFlow(url:delegate:isShortened:): Start a Flow from a URL.
  • startFlow(sessionConfig:delegate:moduleId:): Start (or resume, via moduleId) a server-driven Flow from an IncdOnboardingSessionConfiguration.
  • startWorkflow(sessionConfig:delegate:) : Start a Workflow-based session.
  • startOnboardingSection(flowConfig:sectionTag:delegate:): Start a single tagged section of a flow.

All of these deliver their results and lifecycle events through the IncdOnboardingDelegate.


Headless & Programmatic APIs (No Capture UI)

These methods run capture/verification steps programmatically and return their result through a completion closure, without the SDK presenting its own capture UI. See Capture-Only Mode for when to use them.

func faceMatch(
    matchType: FaceMatchType?,
    idCategory: IDCategory...,
    interviewId: String?,
    completion: @escaping (_ result: FaceMatchResult) -> Void
)

func idProcess(
    idCategory: IDCategory,
    interviewId: String?,
    completion: @escaping (_ result: IdProcessResult) -> Void
)

func geolocation(
    interviewId: String?,
    completion: @escaping (_ result: GeolocationResult) -> Void
)

func getUserScore(
    userScoreFetchMode: UserScoreFetchMode?,
    interviewId: String?,
    completion: @escaping (_ result: UserScore) -> Void
)

func getUserOCRData(
    _ token: String?,
    completion: @escaping (_ result: OmniGetOCRDataResult) -> Void
)
Method Result Model
faceMatch(matchType:idCategory:interviewId:completion:) FaceMatchResult
idProcess(idCategory:interviewId:completion:) IdProcessResult
geolocation(interviewId:completion:) GeolocationResult
getUserScore(userScoreFetchMode:interviewId:completion:) UserScore
getUserOCRData(_:completion:) OmniGetOCRDataResult

faceMatch accepts a variadic idCategory argument, so you may pass zero or more IDCategory values.


Common Types

Several error types are shared across modules and referenced from their individual sections rather than redefined each time.

IncdError

The generic error type used by modules that don't define their own module-specific error.

{/* TODO: Eng to confirm the complete, authoritative case list for IncdError. The only case names documented anywhere are from a "for example" list on the Results module page (notInitialized, resourcesNotFound, noActiveSession, jailbreakDetected, integrityCompromised, unknown), which is explicitly non-exhaustive. Confirm exact case names, associated values (if any), and whether this list is complete. */}

public enum IncdError: Error {
    case notInitialized
    case resourcesNotFound
    case noActiveSession
    case jailbreakDetected
    case integrityCompromised
    case unknown(String)
}

IncdFlowError

The error delivered through onError(_ error: IncdFlowError) on IncdOnboardingDelegate for failures that abort the entire onboarding flow, independent of any single module's own result or error.

{/* TODO: Eng to provide the complete case list for IncdFlowError. No cases have been confirmed anywhere in existing docs; module pages only reference specific dot-notation cases in passing (e.g., IncdFlowError.locationUnavailable from the Geolocation module page). Confirm full enum definition. */}

public enum IncdFlowError: Error {
    // TODO: cases unconfirmed
}

ModuleConfigurationError

The error thrown when a flow's module ordering or composition is invalid, before onboarding starts.

{/* TODO: Eng to provide the complete case list for ModuleConfigurationError. Cases referenced so far in module pages: .invalidOrder (QR Scan module page — thrown when Video Conference, User Consent, or Government Validation are added before QR Scan) and .missingModule (Results module page — thrown when no Selfie module is present in the flow). Confirm whether these are the only two cases, and confirm associated values if any. */}

public enum ModuleConfigurationError: Error {
    case invalidOrder
    case missingModule
    // TODO: additional cases unconfirmed
}

Module Reference

Fine-grained options are set on the flow configuration and on individual capture steps. The full flow-level surface is documented in the Integration Approaches section and per-module options in Modules. The types below are the ones referenced from other pages.

AES (Advanced Electronic Signature)

Adds the AES module to an IncdOnboardingFlowConfiguration.

public func addAes(configuration: AESConfiguration? = nil, showCertificateOnSuccess: Bool)

Configures optional document upload and download behavior for the AES module.

public struct AESConfiguration {
    public let uploadDocument: Bool?
    public let downloadDocument: Bool?
}

Reports the outcome of the AES module through the IncdOnboardingDelegate callback.

func onAESCompleted(result: AESResult)

The result payload delivered to onAESCompleted(result:) and the signing errors returned in AESResult.error.

public struct AESResult {
    public let success: Bool
    public let error: AESError?
}

public enum AESError: Error, Equatable {
    case noDocuments
    case failedToSign
}

Approval

Adds the Approval module to an IncdOnboardingFlowConfiguration.

public func addApproval(forceApproval: Bool? = nil)

Reports the outcome of the Approval module through the IncdOnboardingDelegate callback.

func onApproveCompleted(_ result: ApprovalResult)

The result payload delivered to onApproveCompleted(_:).

public struct ApprovalResult {
    public var uuid: String?
    public var customerToken: String?
    public var success: Bool
    public var error: IncdError?
}

Approval has no module-specific error type; failures surface through ApprovalResult.error as an IncdError.

Captcha

Adds the Captcha module to an IncdOnboardingFlowConfiguration.

public func addCaptcha()

Reports the outcome of the Captcha module through the IncdOnboardingDelegate callback:

func onCaptchaCompleted(_ result: CaptchaResult)

The result payload delivered to onCaptchaCompleted(_:) and the errors returned in CaptchaResult.error.

public struct CaptchaResult {
    public var captcha: String?
    public var error: CaptchaError?
}

public enum CaptchaError {
    case error(_ error: IncdError)
    case wrongCaptchaEntered
    case captchaNotGenerated
}

Adds the Combined Consent module to an IncdOnboardingFlowConfiguration.

public func addCombinedConsents(configuration: CombinedConsentsConfiguration)

Configures the preconfigured consent and language presented by the Combined Consent module.

combinedConsents and language are write-only. You set them through the CombinedConsentsConfiguration initializer shown above, but you won't be able to read them back from an existing CombinedConsentsConfiguration instance.

public struct CombinedConsentsConfiguration: Decodable {
    public init(combinedConsents: String, language: String? = nil)
}

Reports the outcome of the Combined Consent module through the IncdOnboardingDelegate callback.

func onCombinedConsentsGiven(_ result: CombinedConsentResult)

The result payload delivered to onCombinedConsentsGiven(_:).

public struct CombinedConsentResult {
    public let success: Bool?
    public let error: IncdError?
}

Custom Module

Reports when a Custom Module node is reached and lets your app report back a CustomModuleStatus once your custom logic completes.

Custom Module has no client-side builder. It only exists inside Dashboard-defined Workflows, configured through the Workflow node's callbackName. The SDK delivers that name to your app through the delegate.

func onCustomModuleStarted(callbackName: String, onCustomModuleCompleted: @escaping (CustomModuleStatus) -> Void)
func onCustomModuleCompleted(_ result: IncdError?)

There is no result payload object and no module-specific error type. You report the outcome of your custom logic by calling the onCustomModuleCompleted completion handler, passed into onCustomModuleStarted(callbackName:onCustomModuleCompleted:), with a CustomModuleStatus. Separately, the SDK invokes the delegate method onCustomModuleCompleted(_ result: IncdError?) after submitting that status and advancing the Workflow, with result set to an IncdError if something went wrong.

public enum CustomModuleStatus: String {
    case ok = "OK"
    case fail = "FAIL"
    case warn = "WARN"
    case unknown = "UNKNOWN"
}

Dynamic Forms

Adds the Dynamic Forms module to an IncdOnboardingFlowConfiguration.

public func addDynamicForms(configuration: DynamicFormConfiguration)

Configures the screens and questions presented by the Dynamic Forms module.

DynamicFormConfiguration, DynamicFormScreen, and DynamicFormQuestion expose only their initializer parameters below. The values aren't readable back from an existing instance.

public struct DynamicFormConfiguration: Decodable {
    public init(screens: [DynamicFormScreen]?)
}

public struct DynamicFormScreen: Decodable {
    public init(title: String, hideTitle: Bool, questions: [DynamicFormQuestion])
}

public struct DynamicFormQuestion: Decodable {
    public init(
        questionId: String,
        question: String,
        inputType: DynamicFormInputType,
        options: [String]? = nil,
        isOptional: Bool = false
    )
}

public enum DynamicFormInputType: String {
    case text = "TEXT"
    case date = "DATE"
    case number = "NUMBER"
    case country = "COUNTRY"
    case email = "EMAIL"
    case phone = "PHONE"
    case cpf = "CPF"
    case nationality = "NATIONALITY"
    case selection = "SELECT"
    case yesno = "YESNO"
}

Reports the outcome of the Dynamic Forms module through the IncdOnboardingDelegate callback.

func onDynamicFormCompleted(_ result: DynamicFormsResult)

The result payload delivered to onDynamicFormCompleted(_:).

public struct DynamicFormsResult {
    public var answers: [DynamicFormQuestionnaireModel]
    public var error: IncdError?
}

Each entry in answers is a DynamicFormQuestionnaireModel and represents one answered question, carrying question metadata (interviewId, questionId, question text, inputType, isOptional) and answer data (optionalAnswers, selectedAnswer). These fields are internal to the SDK and aren't accessible from your app. They're included here for context on the model's structure, not as fields you interact with directly.

Dynamic Forms does not define a module-specific error type; failures surface through DynamicFormsResult.error as an IncdError.

eKYB

Adds the eKYB module to an IncdOnboardingFlowConfiguration.

public func addEKYB(configuration: ExternalVerificationEkybConfiguration)

Configures which business attributes the eKYB module verifies and where each value is sourced from.

Every parameter is optional and write-only, not readable back from an existing instance.

public struct ExternalVerificationEkybConfiguration: Decodable {
    public init(
        checkBusinessName: Bool? = nil,
        businessNameSource: String? = nil,
        checkAddress: Bool? = nil,
        address: String? = nil,
        checkTaxId: Bool? = nil,
        taxIdSource: String? = nil
    )
}

Reports the outcome of the eKYB module through the IncdOnboardingDelegate callback.

func onExternalValidationEkybCompleted(_ result: EkybResult)

The result payload delivered to onExternalValidationEkybCompleted(_:).

public struct EkybResult {
    public let error: IncdError?
    public var externalVerification: [EkybVerificationStep]?
}

public struct EkybVerificationStep {
    public let stepName: String?
    public let status: String? //success, warning, or failure
    public let additionalInfo: String?
}

EkybResult.error is populated only when the module fails to produce a result at all; for example, a network or configuration failure. This is separate from individual check outcomes, which are reported via each EkybVerificationStep.status (see below).

eKYC

Adds the eKYC module to an IncdOnboardingFlowConfiguration.

public func addEKYC(configuration: ExternalVerificationConfiguration? = nil)

Configures which personal identity fields the eKYC module verifies and where each value is sourced from.

Every parameter is optional and write-only, not readable back from an existing instance.

public struct ExternalVerificationConfiguration: Decodable {
    public enum DataInputSource: String, Decodable {
        case userInput
        case document
        case poa
    }

    public init(
        checkName: Bool? = nil,
        nameSource: ExternalVerificationConfiguration.DataInputSource? = nil,
        checkEmail: Bool? = nil,
        emailSource: ExternalVerificationConfiguration.DataInputSource? = nil,
        checkAddress: Bool? = nil,
        addressSource: ExternalVerificationConfiguration.DataInputSource? = nil,
        checkPhone: Bool? = nil,
        phoneSource: ExternalVerificationConfiguration.DataInputSource? = nil,
        checkSsn: Bool? = nil,
        ssnSource: ExternalVerificationConfiguration.DataInputSource? = nil,
        checkDob: Bool? = nil,
        dobSource: ExternalVerificationConfiguration.DataInputSource? = nil,
        checkNationality: Bool? = nil,
        nationalitySource: ExternalVerificationConfiguration.DataInputSource? = nil
    )
}

Reports the outcome of the eKYC module through the IncdOnboardingDelegate callback.

func onEKYCCompleted(_ result: EKYCResult)

The result payload delivered to onEKYCCompleted(_:).

public struct EKYCResult {
    public var success: Bool
    public var error: IncdError?
}

eKYC does not define a module-specific error type; failures surface through EKYCResult.error as an IncdError.

Face Authentication

Adds the Face Authentication module to an IncdOnboardingFlowConfiguration.

public func addFaceAuthentication(configuration: FaceAuthenticationConfiguration)

Configures capture behavior and liveness checks for the Face Authentication module.

These are write-only. They are set at initialization, but not readable back from an existing instance. Any Bool? check left nil falls back to the corresponding manager-level faceAuth* default.

public struct FaceAuthenticationConfiguration {
    public init(
        deepsight: DeepsightConfiguration = .default,
        showTutorials: Bool? = nil,
        autoCaptureTimeout: Double? = nil,
        captureAttempts: Int? = nil,
        lensesCheck: Bool? = nil,
        faceMaskCheck: Bool? = nil,
        closedEyesCheck: Bool? = nil,
        headCoverCheck: Bool? = nil,
        imageQualitySeverity: ImageQualitySeverity = .defaultValue,
        occlusionCheck: OcclusionCheck = .disabled
    )
}

Reports the outcome of the Face Authentication module through the IncdOnboardingDelegate callback.

func onFaceAuthenticationCompleted(_ result: FaceAuthenticationResult)

The result payload delivered to onFaceAuthenticationCompleted(_:).

public struct FaceAuthenticationResult {
    public var success: Bool?
    public var customerUUID: String?
    public var image: UIImage?
    public var selfieEncryptedBase64: String?
    public var selfieBase64: String?
    public var error: FaceAuthenticationError?
    public var videoRecordingError: FaceAuthenticationError?
}

The errors returned in FaceAuthenticationResult.error and FaceAuthenticationResult.videoRecordingError.

public enum FaceAuthenticationError: Equatable {
    case error(_ error: IncdError)
    case inactiveSession(String)
    case nonexistentCustomer(String)
    case lensesDetected(String)
    case faceMaskDetected(String)
    case headCoverDetected(String)
    case closedEyesDetected(String)
    case faceTooDark(String)
    case spoofAttemptDetected(String)
    case userIsNotRecognized(String)
    case selfieImageLowQuality(String)
    case hintNotProvided(String)
    case faceNotFound(String)
    case faceCroppingFailed(String)
    case faceTooSmall(String)
    case faceTooBlurry(String)
    case badPhotoQuality(String)
    case processingError(String)
    case badRequest(String)
    case deniedCameraPermissions
    case userCancelled
    case selfieFaceOccluded(String)
    case insufficientStorageForVideoRecording
    case unknown(String)
}

insufficientStorageForVideoRecording is non-fatal and only ever reported through FaceAuthenticationResult.videoRecordingError, never through FaceAuthenticationResult.error.

Face Match

Adds the Face Match module to an IncdOnboardingFlowConfiguration.

public func addFaceMatch(
    matchType: FaceMatchType? = nil,
    uiFlavor: UIFlavor? = nil,
    idCategory: IDCategory...,
    showUserExists: Bool? = nil,
    showLivenessStatus: Bool? = nil
)

Reports the outcome of the Face Match module through the IncdOnboardingDelegate callback.

func onFaceMatchCompleted(_ result: FaceMatchResult)

The result payload delivered to onFaceMatchCompleted(_:).

public struct FaceMatchResult: Equatable {
    public var faceMatched: Bool?
    public var existingInterviewId: String?
    public var existingUser: Bool?
    public var confidence: Float?
    public var secondIdConfidence: Float?
    public var nfcSelfieConfidence: Float?
    public var nfcIdConfidence: Float?
    public var nameMatched: Bool?
    public var idCategories: Set<IDCategory>
    public var error: IncdError?
}

Face Match does not define a module-specific error type; failures surface through FaceMatchResult.error as an IncdError. It is also available headlessly.

Full Name

Adds the Full Name module to an IncdOnboardingFlowConfiguration.

public func addFullName()

Full Name has no configurable options.

Reports the outcome of the Full Name module through the IncdOnboardingDelegate callback.

func onAddFullNameCompleted(_ result: UserNameInfoResult)

The result payload delivered to onAddFullNameCompleted(_:).

public struct UserNameInfoResult {
    public var name: String?
    public var error: IncdError?
}

Geolocation

Adds the Geolocation module to an IncdOnboardingFlowConfiguration.

public func addGeolocation(isSkippable: Bool = false)

Reports the outcome of the Geolocation module through the IncdOnboardingDelegate callback.

func onGeolocationCompleted(_ result: GeolocationResult)

The result payload delivered to onGeolocationCompleted(_:) and the errors returned in GeolocationResult.error.

public struct GeolocationResult {
    public var addressFields: OCRDataAddress?
    public var coordinates: (latitude: Double, longitude: Double)?
    public var error: GeolocationError?
}

public enum GeolocationError {
    case error(_ error: IncdError)
    case permissionsDenied
    case noLocationExtracted
    case noNetworkError
    case locationUnavailable
}

Geolocation is also available headlessly through geolocation(interviewId:completion:).

Government Validation

Adds the Government Validation module to an IncdOnboardingFlowConfiguration.

public func addGovernmentValidation(isBackgroundExecuted: Bool = false)

Reports the outcome of the Government Validation module through the IncdOnboardingDelegate callback.

func onGovernmentValidationCompleted(_ result: GovernmentValidationResult)

The result payload delivered to onGovernmentValidationCompleted(_:).

public struct GovernmentValidationResult {
    public var success: Bool
    public var error: IncdError?
}

Government Validation does not define a module-specific error type; failures surface through GovernmentValidationResult.error as an IncdError.

ID OCR

Adds the ID OCR module to an IncdOnboardingFlowConfiguration.

public func addOcr(isEditable: Bool, idRank: IDRank? = nil)

Specifies which captured ID the addOcr review screen applies to, when more than one ID has been captured.

public enum IDRank: String, Decodable {
    case firstID = "FIRST_ID"
    case secondID = "SECOND_ID"
}

Reports the outcome of the ID OCR module through the IncdOnboardingDelegate callback.

func onOcrCompleted()

onOcrCompleted() takes no parameters. The module also exposes a public result type.

public struct OcrResult {
    public var photo: UIImage?
    public var documentNumber: String?
    public var expiryDate: Date?
    public var dateOfBirth: Date?
    public var error: IncdError?
}

You can also fetch OCR data headlessly through getUserOCRData(_:completion:).

NFC

Adds the NFC module to an IncdOnboardingFlowConfiguration.

public func addNfcScan(
    idType: IdType? = nil,
    showNFCSymbolConfirmationScreen: Bool? = nil,
    showInitialDataConfirmationScreen: Bool? = nil,
    showTutorials: Bool? = nil,
    nfcMaxRetries: Int? = nil,
    processNFCData: Bool? = nil,
    returnResultImmediately: Bool? = nil
)

Reports the outcome of the NFC module through the IncdOnboardingDelegate callback.

func onNFCScanCompleted(_ result: NFCScanResult)

The result payload delivered to onNFCScanCompleted(_:).

public struct NFCScanResult {
    public var facePhoto: UIImage?
    public var dg1: NFCDataModel.DG1?
    public var error: NFCScanError?
}

public struct NFCDataModel {
    public struct DG1 {
        public let documentNumber: String?
        public let documentCode: String?
        public let nationality: String?
        public let issuingStateOrOrganization: String?
        public let birthDate: String?
        public let expireAt: String?
        public let gender: String?
        public let primaryIdentifier: String?
        public let secondaryIdentifier: String?
        public let optionalData1: String?
        public let optionalData2: String?
        public let personalNumber: String?
        public let compositeCheckDigit: String?
        public let dateOfBirthCheckDigit: String?
        public let documentNumberCheckDigit: String?
        public let expirationDateCheckDigit: String?
        public let personalNumberCheckDigit: String?
    }
}

The errors returned in NFCScanResult.error.

public enum NFCScanError {
    case error(_ error: IncdError)
    case notAvailable
    case userDocumentHasNoChip
    case noScanAttemptsRemaining
}

QR Scan

Adds the QR Scan module to an IncdOnboardingFlowConfiguration.

public func addQRScan(showTutorials: Bool? = nil)

Reports the outcome of the QR Scan module through the IncdOnboardingDelegate callback.

func onQRScanCompleted(_ result: QRScanResult)

The result payload delivered to onQRScanCompleted(_:).

public struct QRScanResult {
    public var success: Bool?
    public var error: IncdError?
}

Results

Adds the Results module to an IncdOnboardingFlowConfiguration.

public func addUserScore(userScoreFetchMode: UserScoreFetchMode? = nil)

Selects how the Results module fetches the user's score.

public enum UserScoreFetchMode: Int, CaseIterable {
    case accurate = 0
    case fast = 1
}

Reports the outcome of the Results module through the IncdOnboardingDelegate callback.

func onUserScoreFetched(_ result: UserScore)

The result payload delivered to onUserScoreFetched(_:).

public struct UserScore {
    public let idValidation: IDValidation?
    public let liveness: Liveness?
    public let faceRecognition: FaceRecognition?
    public let governmentValidation: GovernmentValidation?
    public let overall: Result?
    public let extendedUserScoreJsonData: Data?
    public var error: IncdError?
}

Result carries value: String? (for example, "80.5/100") and status: Status?:

public enum Status: String {
    case ok = "OK"
    case warning = "WARN"
    case fail = "FAIL"
    case unknown = "UNKNOWN"
    case manual = "MANUAL"
}

The per-category structs expose their own overall: Result? plus category-specific detail: IDValidation (photoSecurityAndQuality: [IDCheck]?, idSpecific: [IDCheck]?), Liveness (livenessScore: Result?, photoQuality: PhotoQuality?), FaceRecognition (croppedFace: String?, croppedIDFace: String?, existingUser: Bool?), GovernmentValidation (recognitionConfidence: Result?, validationStatus: IDCheck?, ocrValidation: [IDCheck]?). Each IDCheck carries key: String?, value: String?, and status: Status?.

Errors surface through UserScore.error as an IncdError; see Common Types.

It is also available headlessly through getUserScore(userScoreFetchMode:interviewId:completion:).

Signature

Adds the Signature module to an IncdOnboardingFlowConfiguration.

public func addSignature(descriptionMaxLines: Int? = nil, documents: [SignDocument] = [])

Deprecated. Use addSignature(descriptionMaxLines:documents:) above for new integrations. This overload remains available for existing code, but title and description should be set via Localizable.strings instead; see Localize Display Text.

@available(*, deprecated, message: "Use addSignature(descriptionMaxLines:documents:) and set title/description via Localizable.strings instead.")
public func addSignature(title: String? = nil, description: String? = nil, descriptionMaxLines: Int? = nil, documents: [SignDocument] = [])

Configures document signing and (for the deprecated overload only) legacy title/description text for the Signature module.

public struct SignDocument {
    public let title: String
    public let fileURL: URL
    public let signaturePositions: [SignaturePosition]
}

Reports the outcome of the Signature module through the IncdOnboardingDelegate callback.

func onSignatureCollected(_ result: SignatureFormResult)

The result payload delivered to onSignatureCollected(_:), and the errors returned in SignatureFormResult.error.

public struct SignatureFormResult {
    public var signature: UIImage?
    public var signedDocuments: [SignDocument]?
    public var error: SignatureError?
}

public enum SignatureError {
    case error(_ error: IncdError)
    case declinedToSignDocument
    case retryLimitReached
}

Adds the User Consent module to an IncdOnboardingFlowConfiguration.

public func addUserConsent(title: String? = nil, content: String? = nil)

Reports the outcome of the User Consent module through the IncdOnboardingDelegate callback.

func onUserConsentGiven(_ result: UserConsentResult)

The result payload delivered to onUserConsentGiven(_:).

public struct UserConsentResult {
    public var success: Bool?
    public var error: IncdError?
}

User Consent does not define a module-specific error type; failures surface through UserConsentResult.error as an IncdError.

Video Conference

Adds the Video Conference module to an IncdOnboardingFlowConfiguration.

public func addVideoConference(disableMicOnCallStarted: Bool? = nil)

Reports the outcome of the Video Conference module, along with queue and wait-time updates, through IncdOnboardingVideoConferenceDelegate.

public protocol IncdOnboardingVideoConferenceDelegate: AnyObject {
    func onVideoConferenceCompleted(_ success: Bool, _ error: VideoConferenceError?)
    func onEstimatedWaitingTime(_ waitingTimeInSeconds: Int)
    func onQueuePositionChanged(_ newQueuePosition: Int)
    func onCaptchaCompleted(_ result: CaptchaResult)
}

The error returned in onVideoConferenceCompleted(_:_:).

public enum VideoConferenceError {
    case error(_ error: IncdError)
}

Video Conference delivers no result payload; completion is reported through onVideoConferenceCompleted(_:_:) on the callback set above, which is also declared on IncdOnboardingDelegate.

Video Selfie

Adds the Video Selfie module to an IncdOnboardingFlowConfiguration.

public func addVideoSelfie(videoSelfieConfiguration: VideoSelfieConfiguration)

Configures the guided actions, checks, and recording behavior for the Video Selfie module. Unlike other modules' configuration types, VideoSelfieConfiguration is built through its initializer plus a mix of instance methods and settable properties, rather than through initializer parameters alone.

{/* TODO: Eng to confirm the exact public signatures below — these are reconstructed from the module page's prose/table descriptions and example usage, not from original SDK header text. Confirm parameter names, types, optionality, and defaults for every method and property. */}

public class VideoSelfieConfiguration {
    public init(
        lensesCheck: Bool? = nil,
        faceMaskCheck: Bool? = nil,
        closedEyesCheck: Bool? = nil,
        headCoverCheck: Bool? = nil
    )

    public func selfieScan(enabled: Bool, performLivenessCheck: Bool, mode: SelfieMode)
    public func idScan(enabled: Bool, validateId: Bool?)
    public func voiceConsent(enabled: Bool, consent: String? = nil, faceRecognition: Bool)
    public func randomQuestions(enabled: Bool, questionsCount: Int? = nil, questions: [String: String]? = nil)
    public func handGesture(enabled: Bool)
    public func tutorials(enabled: Bool)
    public func authorizationDialog(enabled: Bool, companyTitle: String)
    public func maxVideoLength(_ seconds: Int)
    public func showSelfieStepFirst(_ enabled: Bool)
    public func setLogo(_ logo: UIImage?)

    @available(*, deprecated, message: "Use idScan(enabled:validateId:) instead.")
    public func documentScan(enabled: Bool)

    public var cameraFacingConfig: CameraFacingConfiguration
    public var videoCodecType: VideoSelfieCodecType
    public var disableAudio: Bool
    public var minVideoLengthRequired: Bool
}

public enum SelfieMode {
    case selfieMatch
    case faceMatch
}

public enum VideoSelfieCodecType {
    case hevc
    case h264
}

Reports the outcome of the Video Selfie module through the IncdOnboardingDelegate callback.

func onVideoSelfieCompleted(_ result: VideoSelfieResult)

The result payload delivered to onVideoSelfieCompleted(_:).

public struct VideoSelfieResult {
    public var selfie: UIImage?
    public var idFront: UIImage?
    public var idBack: UIImage?
    public var passport: UIImage?
    public var document: UIImage?
    public var voiceConsentSelfie: UIImage?
    public var audioData: Data?
    public var videoData: Data?
    public var error: VideoSelfieError?
}

The errors returned in VideoSelfieResult.error.

{/* TODO: Eng to confirm the complete, authoritative case list for VideoSelfieError. Two independent, non-exhaustive lists exist in current docs and do not fully agree: this API Reference page previously listed error(_ error: IncdError), internalError(String), and videoSelfieNotAuthorized "among others," while the module page separately lists 14 cases (below) as "for example" — the two lists share only videoSelfieNotAuthorized. Confirm whether error(_:) and internalError(String) are real cases, and produce one complete, non-hedged list. */}

public enum VideoSelfieError {
    case error(_ error: IncdError)
    case internalError(String)
    case videoSelfieNotAuthorized
    case screenRecordingPermissionsDenied
    case recordingMicrophonePermissionsDenied
    case voiceConsentMicrophonePermissionsDenied
    case cameraPermissionsDenied
    case selfieNotMatched
    case idNotValid
    case idTypeNotMatched
    case idOCRNotValid
    case idFaceNotMatched
    case audioNotMatched
    case videoUploadError
    case spoofDetected
    case maxVideoLengthReached
}

Was this page helpful?