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 = false,
testMode: Bool = false,
_ completion: ((Bool?, IncdInitError?) -> Void)? = nil
)
The completion closure reports success (Bool?) and an IncdInitError? on failure.
Console logs are disabled by default. Pass true for loggingEnabled to enable SDK logs.
testMode: true runs the SDK in development test mode on both simulators and physical devices, and prints a console warning while enabled. IncdInitError.testModeEnabled remains available for source compatibility but is no longer reported. See Enable Test Mode.
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, viamoduleId) a server-driven Flow from anIncdOnboardingSessionConfiguration.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. Conforms to Equatable, and exposes:
- A computed
description: String: The human-readable message. - A
rawValue: String: The case name without associated values.
public enum IncdError: Equatable {
case notInitialized
case resourcesNotFound
case unknown
case noActiveSession
case integrityCompromised
case apiKeyRevoked(key: String?)
case sslPinningFailed
}
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. Exposes a computed description: String.
public enum IncdFlowError {
case initError(_ error: IncdInitError)
case error(_ error: IncdError)
case sessionCreationFailed(_ errDesc: String)
case permissionsDenied
case fakePermissionsDenied
case declinedToSignDocument
case captchaNotVerified(_ errDesc: String)
case videoSelfieNotCompleted(_ err: VideoSelfieError)
case sectionAlreadyRunning(_ activeSectionTag: String)
case watchlistProcessFailed(_ errDesc: String)
case interrupted
case biometricConsentNotGiven
case biometricConsentNotReceived
case flowNotFetched
case audioPermissionsDenied
case authenticationFailed(_ errDesc: String)
case locationUnavailable
}
ModuleConfigurationError
The error thrown during flow configuration when a flow's module ordering or composition is invalid, before onboarding starts. Each case carries a human-readable description string.
ModuleConfigurationError is declared internal in the SDK. These errors are raised while building the flow configuration, but the type is not part of the public API and cannot be caught by name in integrator code.
enum ModuleConfigurationError: Error {
case invalidOrder(_ errDesc: String)
case missingModule(_ errDesc: String)
case notAvailable(_ errDesc: String)
}
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.
showCertificateOnSuccess was removed in iOS SDK 5.47.0. Configure the signed-document action with AESConfiguration.downloadDocument; when it's enabled, the success screen offers a Download document action. See the Migration Guide for the call-site change.
public func addAes(configuration: AESConfiguration? = nil)
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
}
Combined Consent
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 Capture
IDFrameAnalysisError gains a new case:
case preparingCamera // new
preparingCamera is reported through IDCaptureFeedback.error while the ID camera is getting ready, before the preview is shown. It is not an error: the capture continues normally once the camera is ready, and the SDK's own screens show the existing "Adjusting camera" copy for it, just like settingUpStreaming. If you switch exhaustively over IDFrameAnalysisError, add a handler for this case.
public struct IDCaptureFeedback {
public let error: IDFrameAnalysisError
}
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
}
QES (Qualified Electronic Signature)
Adds the QES module to an IncdOnboardingFlowConfiguration.
public func addQes(configuration: QESConfiguration? = nil)
public struct QESConfiguration: Decodable {
public let uploadDocument: Bool?
public let downloadDocument: Bool?
public let providerCode: String?
}
When uploadDocument is enabled, the user picks and uploads a PDF before the signing screen. providerCode selects the qualified signature provider for the session: for example, QES_3 for Namirial. It is normally supplied by the Flow configuration in Dashboard.
func onQESCompleted(result: QESResult)
public struct QESResult {
public let success: Bool
public let error: QESError?
}
public enum QESError: Error, Equatable {
case noDocuments
case failedToSign
}
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:).
Selfie
SelfieScanResult carries two independent error fields:
public var error: SelfieScanError? // terminal capture failure
public var videoRecordingError: SelfieScanError? // non-fatal
SelfieScanError includes insufficientStorageForVideoRecording, reported when Deepsight video recording is skipped because the device has less than 15 MB of free storage. It is non-fatal and only ever reported through SelfieScanResult.videoRecordingError, never through SelfieScanResult.error; the capture itself completes normally.
See Selfie for the full result payload and error list.
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
}
User Consent
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 and a mix of instance methods and settable properties, instead of only through initializer parameters.
SelfieMode and VideoSelfieCodecType are nested inside VideoSelfieConfiguration. Reference them as VideoSelfieConfiguration.SelfieMode and VideoSelfieConfiguration.VideoSelfieCodecType.
A deprecated voiceConsent(enabled:questionsCount:randomQuestions:consent:faceRecognition:) overload also exists; prefer the separate voiceConsent(...) and randomQuestions(...) methods instead.
public class VideoSelfieConfiguration {
public enum SelfieMode: String, CaseIterable {
case selfieMatch
case faceMatch
}
public enum VideoSelfieCodecType: Int, CaseIterable {
case hevc = 0
case h264 = 1
}
public init(
lensesCheck: Bool? = nil,
faceMaskCheck: Bool? = nil,
closedEyesCheck: Bool? = nil,
headCoverCheck: Bool? = nil
)
public func selfieScan(
enabled: Bool = true,
performLivenessCheck: Bool = false,
mode: SelfieMode = .selfieMatch,
lensesCheck: Bool? = nil,
faceMaskCheck: Bool? = nil,
closedEyesCheck: Bool? = nil,
headCoverCheck: Bool? = nil,
performHeadMovementCheck: Bool = false
)
public func idScan(
enabled: Bool,
validateId: Bool? = nil,
compareIdEnabled: Bool? = nil,
compareOcrEnabled: Bool? = nil,
compareBackIdEnabled: Bool? = nil,
compareBackOcrEnabled: Bool? = nil
)
public func voiceConsent(enabled: Bool, consent: String? = nil, faceRecognition: Bool = false)
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: "Document scan step will be removed in a future version.")
public func documentScan(enabled: Bool)
public var cameraFacingConfig: CameraFacingConfiguration
public var videoCodecType: VideoSelfieCodecType
public var disableAudio: Bool
public var minVideoLengthRequired: Bool
}
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 {
@available(*, deprecated, message: "Check if `error` is `nil` instead.")
public var success: Bool { error == nil }
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. Exposes a computed rawValue: String, the case name without associated values.
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
}