Crash Fix: Concurrency-related UI rendering issues.
The SDK subscribes the iOS system notification
AVCaptureSessionWasInterruptedNotification. When reason is AVCaptureSessionInterruptionReasonVideoDeviceInUseByAnotherClient, then sdk will throw this error code `INTERRUPTED_BY_ANOTHER_CLIENT`.This error means the iOS system forcibly revoked the camera access from the SDK while liveness detection was in progress — typically because the user received a phone/FaceTime call, or switched to another app that claimed the camera (e.g., a video call app). This is an OS-level preemption that the SDK cannot prevent.
Recovery is straightforward: once the interrupting app releases the camera (e.g., the call ends), your app should prompt the user to retry and call
livenessVC.restartDetection(). The SDK will re-initialize the camera and restart detection from the beginning. No need to recreate or re-present the view controller.Sample Code:
vc.detectionFailureBlk = { (rawVC, result) in
if result.errorCode == "INTERRUPTED_BY_ANOTHER_CLIENT" {
// Show a UI message such as:
// "Liveness check was interrupted. Please dismiss the call and try again."
// Then, once the user taps "Retry":
rawVC.restartDetection()
return
}
// ... your other failure handling
}
Comments
0 comments