In an app, I\'m currently taking a picture only after camera permissions have been checked, as follows:
AVAuthorizationStatus authStatus = [AVCaptureDevice a
You need to request for permission using the following code:
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
if(authStatus == AVAuthorizationStatusAuthorized)
{
// Take picture
}
else
{
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted)
{
if (granted)
{
NSLog(@"User Granted");
}
else
{
NSLog(@"User Denied");
}
}];
}