User Journeys
User Journeys are multi-step capture sessions orchestrated by the SDK in conjunction with the configured flow. For example, a flow with Liveness + Risk Score + Document Capture + Electronic Signature executes selfie, document capture, and signature in a single session.
The available journeys depend on the flow configured for your integration. Refer to Use Cases for the full mapping of use case → flow → capability.
The SDK:
- Reads the flow configuration provided during initialization.
- Orchestrates the sequence of captures required for the flow (selfie, document, signature).
- Returns a result object for each capture step.
The orchestration is handled entirely by the SDK — you do not need to implement the step sequence in your app.
Step 1 — Implement AcessoBioManagerDelegate
AcessoBioManagerDelegate handles the SDK lifecycle callbacks. Implement the four mandatory methods:
| Method | When it's called |
|---|---|
onErrorAcessoBioManager(error) | An error occurred during SDK operation |
onUserClosedCameraManually() | The user manually closed the camera |
onSystemClosedCameraTimeoutSession() | The 40-second session limit was reached |
onSystemChangedTypeCameraTimeoutFaceInference() | No face detected for 13 seconds — switches to manual capture |
- Swift
- Objective-C
class ViewController: UIViewController, AcessoBioManagerDelegate {
var unicoCheck: AcessoBioManager!
override func viewDidLoad() {
super.viewDidLoad()
unicoCheck = AcessoBioManager(viewController: self)
}
func onErrorAcessoBioManager(_ error: ErrorBio!) { }
func onUserClosedCameraManually() { }
func onSystemClosedCameraTimeoutSession() { }
func onSystemChangedTypeCameraTimeoutFaceInference() { }
}
@implementation ViewController: UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
unicoCheck = [[AcessoBioManager alloc]initWithViewController:self];
}
- (void)onErrorAcessoBioManager:(ErrorBio *)error { }
- (void)onSystemChangedTypeCameraTimeoutFaceInference { }
- (void)onSystemClosedCameraTimeoutSession { }
- (void)onUserClosedCameraManually { }
@end
All four delegate methods above must be created in your project (even without any logic). Otherwise, the project will not compile successfully.
Step 2 — Implement AcessoBioSelfieDelegate
Override the methods to handle the journey capture result callbacks:
| Method | Description |
|---|---|
onSuccessSelfie(result) | Image captured successfully — returns SelfieResult for subsequent REST API calls |
onSuccess(result) | WebApp flow completed successfully — returns a processId used to query validation results |
onErrorSelfie(errorBio) | Capture failed — returns an ErrorBio with error details |
- Swift
- Objective-C
class ViewController: UIViewController, AcessoBioManagerDelegate,
SelfieCameraDelegate, AcessoBioSelfieDelegate {
func onSuccessSelfie(_ result: SelfieResult!) { }
func onSuccess(_ result: SuccessResult!) { }
func onErrorSelfie(_ errorBio: ErrorBio!) { }
}
@interface ViewController: UIViewController <AcessoBioManagerDelegate,
SelfieCameraDelegate, AcessoBioSelfieDelegate>
@end
@implementation ViewController
- (void)onSuccessSelfie:(SelfieResult *)result { }
- (void)onSuccess:(SuccessResult *)result { }
- (void)onErrorSelfie:(ErrorBio *)errorBio { }
@end
Step 3 — Call prepareSelfieCamera and open
Call prepareSelfieCamera passing the SDK config. When the camera is ready, the onCameraReady event is triggered — open the camera through the open() method, passing the web_app_token:
The web_app_token is the process.webAppToken field returned by POST /client/v1/process when creating the process on your backend. See Create Process.
onCameraReady(cameraOpener)— camera is ready; callopen(self, webAppToken:).onCameraFailed(message)— camera preparation failed (ErrorPrepareis an extension ofErrorBio).
- Swift
- Objective-C
@IBAction func openCamera(_ sender: Any) {
unicoCheck.build().prepareSelfieCamera(self, config: YourUnicoConfigClass())
}
func onCameraReady(_ cameraOpener: AcessoBioCameraOpenerDelegate!) {
cameraOpener.open(self, webAppToken: "your_web_app_token")
}
func onCameraFailed(_ message: ErrorPrepare!) { }
- (IBAction)openCamera:(UIButton *)sender {
[[unicoCheck build] prepareSelfieCamera:self config:[YourUnicoConfigClass new]];
}
- (void)onCameraReady:(id)cameraOpener {
[cameraOpener open:self webAppToken:@"your_web_app_token"];
}
- (void)onCameraFailed:(ErrorPrepare *)message { }
For the full result handling, see Receiving the result.