Been using AVCaptureSession to record barcodes, and it works well. I also have followed the advice on stack overflow (How to properly release an AVCaptureSession) to
[_session stopRunning];
[_prevLayer removeFromSuperlayer];
_prevLayer = nil;
_session = nil;
in ViewWillDisappear, with the hope that it properly releases the CaptureSession. (Other answers in SO refer to pre ARC time)
However, when I toggle the camera privacy settings for the App (E.g. from enabled to disabled, or vice versa), the App crashes. This is a problem because a user that doesn't originally enable Camera cannot do it retrospectively without it crashing. Is there anything else I need to do to prevent this from happening?
Thanks much!