Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Touch ID freezes AVCaptureDevice

I have an AVCaptureDevice to display a live camera preview on screen.

When a Touch ID view is overlaid on the camera preview (using CAContext's evaluatePolicy), the camera preview freezes. When the Touch ID view is dismissed, the camera preview flashes a black screen before restarting.

Both the freezing and the black screen flash are problematic. How can I keep the camera preview alive with the Touch ID view overlaid?

like image 804
Randomblue Avatar asked Apr 18 '15 11:04

Randomblue


1 Answers

I'm not sure that this is possible. The app seems to lose control when the Touch ID alert is on the screen. I know that our app doesn't get rotation events when the dialog is up, and I know when I examine the view hierarchy with Reveal.app I don't see the Touch ID view in my hierarchy.

Can you run the camera in a background mode? That might do the trick, but I don't think camera use is permitted in the background.

like image 70
Paul Cezanne Avatar answered Oct 10 '22 23:10

Paul Cezanne