got the below issue in my application..i got below issue iOS 10 only. before versions the issue is not replicated.
1) Install/Reinstall the my iOS build. 2) Go to media items --> Images/video. 3) While using "Take photo" and "Take Video" option at very first time, it will ask the permission to take the photo/video. Now confirm the permission.
Issue: Once the confirm the permission it should be in camera screen, but still it is in my application app screen.
I am adding “Privacy - Camera Usage Description” in info.plist. but still getting same issue.
My Code:
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
if (authStatus == AVAuthorizationStatusAuthorized)
{
// do your logic
UIImagePickerController *imagePickController = [[UIImagePickerController alloc]init];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
imagePickController.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePickController.delegate = self;
imagePickController.allowsEditing = NO;
imagePickController.showsCameraControls = YES;
[[NSOperationQueue mainQueue] addOperationWithBlock: ^{
[UIApplication sharedApplication].statusBarHidden = YES;
[self presentViewController:imagePickController animated:YES completion:nil];
}];
}
else {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"CAMERA_NOTAVAILABLE", nil) message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:LOC(@"ok"), nil];
[alertView show];
[alertView setTag:Camera_Access_TAG];
}