Skip to main content
Version: 1.6.0 and above

Deprecated API

Deprecated

All methods on this page are deprecated and will be removed in a future release. Use the modern API instead.


start(token:isRoutedSession:preferredLanguage:bindingKey:fromViewController:listener:)

Starts an identity verification session.

public func start(
token: String,
isRoutedSession: Bool = false,
preferredLanguage: String = "",
bindingKey: String? = nil,
fromViewController: UIViewController,
listener: @escaping IDnowDocIDVResultListener
)

Parameters

ParameterTypeRequiredDefaultDescription
tokenStringThe session token, format XYZ-ABCDE
isRoutedSessionBoolfalseWhether the session is routed
preferredLanguageString""ISO 639-1 language code (e.g. "fr", "de")
bindingKeyString?nilOptional key for device binding use cases
fromViewControllerUIViewControllerThe presenting view controller
listenerIDnowDocIDVResultListenerCallback returning a result type and result code

Example

IDnowDocIDV.shared.start(
token: "XYZ-ABCDE",
fromViewController: self
) { type, statusCode, message in
switch type {
case .FINISHED:
print("Success")
case .CANCELLED:
print("Cancelled: \(statusCode.description) - \(message)")
case .ERROR:
print("Error: \(statusCode.description) - \(message)")
}
}

IDnowDocIDVResultListener

Callback used by the deprecated start method.

public typealias IDnowDocIDVResultListener = (
IDnowDocIDV.IdentResult.type,
IDnowDocIDV.IdentResult.statusCode,
String
) -> Void
ParameterTypeDescription
1stIdentResult.typeThe result type of the session
2ndIdentResult.statusCodeThe status code of the session
3rdStringA human-readable message

IdentResult

Holds the result of an identification session. Nested class of IDnowDocIDV.

public class IdentResult

type

public enum type: Int {
case FINISHED
case CANCELLED
case ERROR
}
CaseRaw ValueDescription
FINISHEDThe session completed successfully
CANCELLEDThe session was cancelled by the user
ERRORThe session ended with an error

statusCode

public enum statusCode: Int
CaseCodeDescription
E1010Default error
E100100Token format incorrect
E101101Token not found
E102102Token expired or deleted
E103103Token already completed
E110110Ident info response not parsable or empty
E111111Ident info server error
E120120Messages response not parsable or empty
E121121Messages server error
E130130Resources response not parsable or empty
E131131Resources server error
E140140QES name response not parsable or empty
E141141QES name server error
E142142QES name missing fullname
E150150Start ident response not parsable or empty
E151151Start ident server error
E152152Start ident missing session key
E153153VideoIdent token used in DocIDV SDK
E160160Start ident via web failed
E170170Backend forced websocket close
E171171Backend command PROCESS_FAILED via websocket
EUnreachable1000Server unreachable