私はiOS 10のマイクに許可を求める際に奇妙な問題があります。私は適切なplistプロパティ(Privacy - Microphone Usage Description)コード。私の電話機では、マイクが動作し、有効になっており、携帯電話のアプリ設定で表示されます。ただし、友人の電話では、マイクから許可が求められますが、マイクオプションはアプリの設定に表示されません。パーミッションを正しく設定しても、私はここで何か不足していますか?なぜ私の電話は設定では表示されますが、友人の電話では表示されませんでしたか?私はiPhone SEを持っていて、私の友人はiPhone 6を持っています。iOSマイクロフォンオプションは許可されていてもアプリケーション設定にありません
plistのプロパティ:許可を求める
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture microphone input</string>
コード:
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];
}
ありがとう!
を完璧に良い質問を人々ダウン投票されているのはなぜマイクの許可を扱うために使用する次のコードを持っていますか?問題は明確であり、関連する詳細を提供します。ほかに何が欲しいですか? – rmaddy