I'm having a weird issue with asking for permission to the microphone on iOS 10. I put the proper plist property (Privacy - Microphone Usage Description) and enabling it through code. On my phone, the microphone works/enabled and I see it in my phone's settings for the app. However, on a friend's phone, the microphone asks for permission but then the microphone option doesn't show up in the app's settings. Am I missing something here even though I set the permissions correctly? Why would my phone show the option in the settings but not my friend's phone? I have an iPhone SE and my friend has an iPhone 6s.
plist property:
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture microphone input</string>
code asking for permission:
if ([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio] == AVAuthorizationStatusAuthorized) {
[self configureMicrophone];
}
else {
UIAlertController *deniedAlert = [UIAlertController alertControllerWithTitle:@"Use your microphone?"
message:@"The FOO APP requires access to your microphone to work!"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *action = [UIAlertAction actionWithTitle:@"Go to Settings" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}];
[deniedAlert addAction:action];
[self presentViewController:deniedAlert animated:YES completion:nil];
}
Thanks!