let configuration = Keyless.EnrollmentConfiguration.builder
// custom token is required
.withCustomToken("myToken")
// device info is optional
.withDeviceInfo("device-name")
// operation info is optional (same "operation_id" cannot be re-used)
.withOperationInfo(id: "operation_id", payload: "your payload")
// number of enrollment circuits is optional
.withNumberOfEnrollmentCircuits(5)
enrollmentConfiguration: configuration,
onProgress: { progress in
print("Enrollment progress: \(progress)")
onCompletion: { result in
case .success(let enrollmentSuccess):
print("Enrollment finished successfully. UserID: \(enrollmentSuccess.keylessId)")
case .failure(let error):
print("Enrollment finished with error: \(error.message)