Used by AVCaptureSession to record barcodes, and it works well. I also followed the recommendations on stack overflow ( How to properly release AVCaptureSession ) in
[_session stopRunning]
[_prevLayer removeFromSuperlayer]
_prevLayer = nil;
_session = nil;
in ViewWillDisappear, hoping it will correctly issue the CaptureSession. (Other answers in SO refer to the period prior to ARC)
However, when I switch the cameraβs privacy settings for the application (for example, from enabled to disabled or vice versa), the application crashes. This is a problem because a user who did not initially enable Camera cannot retrospectively do this without crashing it. Is there anything else I need to do to prevent this from happening?
Thank you so much!
source
share