Azure / Azure/AzureAIVisionFaceUI

Navigating Back Does Not Stop Camera Session

Open
#13 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3
Forks
7
Avg merge
15m
Merged PRs (30d)
1

Description

## Description
When navigating back from a view that uses the AzureAIVisionFaceUI camera component, the camera session continues running in the background. This results in ongoing camera usage, potential performance impact, and unexpected behavior when reopening the camera view.

## Steps to Reproduce
1. Present a view that initializes the AzureAIVisionFaceUI camera.
2. Init `FaceLivenessDetectorView` with token
3. Use the navigation back action (e.g., navigation bar back button, swipe back gesture).
4. Observe device camera activity after leaving the screen in the system bar and Xcode logs.
5. Reenter to screen with `FaceLivenessDetectorView` view cause unexpected Liveness status behaviour
6. see attached [screen recording](https://drive.google.com/file/d/1w0flXDNzkz5Wyw0zvlBNIvu4xdn6zAF9/view?usp=sharing)

## Expected Behavior
The camera session should stop immediately when the user navigates away from the view.
Any camera-related resources (capture session, preview layer, timers, threads, etc.) should be fully released.

## Environment
AzureAIVisionFaceUI version: 1.4.5
Device model: iPhone 14 Pro
OS version: iOS 26.1

## Additional Notes

Here you can find logs from debug console. As you can see after log "LivenessContainerFeatureUIView disappeared" we have got messages from AzureAIVisionFaceUI framework
check: lockExposure
check: lockFocus

check: unlockFocusAndExposure
LivenessContainerFeatureUIView disappeared
check: lockExposure
check: lockFocus
<<<< FigXPCUtilities >>>> signalled err=-17281 at <>:302
<<<< FigCaptureSourceRemote >>>> Fig assert: "err == 0 " at bail (FigCaptureSourceRemote.m:569) - (err=-17281)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.