1. Function Signature
Copy
Quepass.launchJourney(
journey: String,
govVerification: Bool? = nil,
eventId: String? = nil,
uid: String? = nil,
ticketType: String? = nil,
data: String? = nil,
signature: String? = nil,
isActiveLiveness: Bool = false,
isPassiveLiveness: Bool = false,
kioskMode: Bool = false,
documentType: DocumentType? = nil,
documentNumber: String? = nil,
documentNumberType: DocumentSearchType? = nil,
documentNumberTypeString: String? = nil,
biometricType: BiometricType? = nil,
callBack: @escaping (Bool, CognetIdentityKitOutputModel) -> Void
) -> UIViewController?
2. Required Parameters by Journey
| Journey | Required Params |
|---|---|
| Onboarding | documentType |
| Authentication | documentNumber, documentNumberType, biometricType |
| Transaction | uid, biometricType |
| Search | biometricType |
| EventQRRegistration | ticketType, eventId |
| EventBiometricCheckIn | eventId |
| EventQRCheckIn | data, signature, eventId |
| EventBiometricCheckInByDoc | biometricType, eventId |
3. Examples
- Onboarding:
Copy
Quepass.lounchJourney(
journey: CognetJourney.onboarding,
isActiveLiveness: true,
isPassiveLiveness: true,
kioskMode: false,
documentType: .idCard
) { status, output in
if status, let data = output.data {
let uid = data["uid"] as? String
let token = data["token"] as? String
} else {
let error = output.errors?.first?.message ?? "Registration failed"
}
}
- Authentication:
Copy
Quepass.lounchJourney(
journey: CognetJourney.authentication,
govVerification: true,
eventId: "",
isActiveLiveness: true,
isPassiveLiveness: true,
kioskMode: false,
documentNumber: "DOC123",
documentNumberType: .idCard,
biometricType: .face
) { status, output in
if status, let data = output.data {
let uid = data["uid"] as? String
let token = data["token"] as? String
}
}
- Transaction:
Copy
Quepass.lounchJourney(
journey: CognetJourney.transaction,
govVerification: true,
eventId: "",
isActiveLiveness: true,
isPassiveLiveness: true,
kioskMode: false,
uid: "user-uid",
biometricType: .face
) { status, output in
if status { /* Transaction verified */ }
}
- Search:
Copy
Quepass.lounchJourney(
journey: CognetJourney.search,
govVerification: true,
eventId: "",
isActiveLiveness: true,
isPassiveLiveness: true,
kioskMode: false,
biometricType: .face
) { status, output in
if status, let data = output.data {
let uid = data["uid"] as? String
}
}
- Event Registration:
Copy
Quepass.lounchJourney(
journey: CognetJourney.eventQRRegistration,
uid: nil,
govVerification: true,
ticketType: "VIP",
eventId: "event-123",
isActiveLiveness: true,
isPassiveLiveness: true,
kioskMode: false
) { success, output in
if success, let data = output.data {
let payload = data["payload"] as? [String: Any]
let qrData = payload?["data"] as? String
let signature = payload?["signature"] as? String
}
}
- Embedded View (KioskMode / EventBiometricCheckIn):
Copy
if let vc = Quepass.lounchJourney(
journey: QuepassJourney.kioskMode,
govVerification: true,
eventId: "event-123",
callBack: { success, output in
if success, let data = output.data {
let uid = data["uid"] as? String
}
}
) {
present(vc, animated: true)
}
Response: QuepassIdentityKitOutputModel
public struct QuepassIdentityKitOutputModel {
public var code: Int // 200, 400, etc.
public var data: [String: Any]? // Response payload
public var errors: [APIErrorModel]?
}
public struct APIErrorModel {
public let code: Int
public let message: String
public let details: String
}
- ExpressVerfication:
Copy
Quepass.launchJourney(
journey: expressVerification,
identifierType: identifierType,
identifierNumber: String,
nationality: String
) { status, response in
print(response)
}
- ExpressOnboarding:
Copy
Quepass.launchJourney(
journey: QuepassJourney.ExpressOnboarding,
isActiveLiveness: SettingsManager.shared.settings.activeLiveness, isPassiveLiveness: SettingsManager.shared.settings.passiveLiveness, kioskMode: SettingsManager.shared.settings.kioskMode, identifierType: identifierType,
identifierNumber: identifierNumber,
nationality: nationalityParam
) { status, response in
if !status {
errorMessage = response.errors?.first?.message ?? "Fastrack registration failed"
showErrorAlert = true
} else {
if let dataDict = response.data,
let jsonData = try? JSONSerialization.data(withJSONObject: dataDict, options: [.prettyPrinted]),
let jsonString = String(data: jsonData, encoding: .utf8) {
result = jsonString
} else {
result = "Registration completed"
}
}
}
- Success data (common fields):
- uid — User unique ID
- token — Consent token
- message — Success message
- isSuccess — Boolean