I agree with Paul Cezanne, I don't think you can do the capture while the TouchID process is active. While I don't see any specific information in either the docs or the header files, through some testing you can see what is happening.
First, the TouchID prompt is running outside of your process.
1. Run your TouchID enabled app on a device in the debugger.
2. Get the app to display the TouchID prompt.
3. In Xcode, pause the app.
Normally, the app would be frozen on the device, but in this case, you can still use your fingerprint or the cancel button to close the dialog. Once you close the TouchID prompt, the app is paused as you would expect.
Set a breakpoint in the evaluatePolicy callback. Accept TouchID with your finger print and you'll see that block is getting called from CoreAuthentication.daemon.
-[ViewController startTouchID:]_block_invoke at .../testTouchIDThreadding/testTouchIDThreadding/ViewController.m:60
-[LAContext evaluatePolicy:options:reply:]_block_invoke () /*THIS IS MY BLOCK*/
...
-[NSXPCConnection _sendInvocation:withProxy:remoteInterface:withErrorHandler:timeout:userInfo:]_block_invoke310 ()
...
Enqueued from com.apple.NSXPCConnection.m-user.com.apple.CoreAuthentication.daemon (Thread 3)Queue : com.apple.NSXPCConnection.m-user.com.apple.CoreAuthentication.daemon (serial)
...
Since TouchID is leveraging the device hardware to read the thumbprint and compare it to the print stored on chip I think that needs to restrict access to any other device hardware while the process is executing.
From your experience and a test app I just threw together, this seems to be true. I opened the camera using UIImagePickerController and while open, I called laContext evaluatePolicy:... and it paused the camera capture.
So in summary when you are using the TouchID validation:
- Your process is still the active app, but you have called out of your process
- Apple is restricting access to the device hardware for the duration