3

The only documented method for checking mic permission on iOS 7 that I could find is requestRecordPermission documented on AVAudioSession. https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioSession/requestRecordPermission:

However, the very act of checking permission using this method will display an alert asking user for permission if user hasn't already made a decision, which can be very undesirable. Is there a work around to check mic permission without showing a prompt?

Tony
  • 36,591
  • 10
  • 48
  • 83

1 Answers1

7

In iOS 8, they added a new property to AVAudioSession:

[AVAudioSession sharedInstance].recordPermission

That returns a AVAudioSessionRecordPermission:

enum {
   AVAudioSessionRecordPermissionUndetermined     = 'undt',
   AVAudioSessionRecordPermissionDenied           = 'deny',
   AVAudioSessionRecordPermissionGranted          = 'grnt'
};
typedef NSUInteger  AVAudioSessionRecordPermission;

But there doesn't seem to be a way in iOS 7.

Mr. T
  • 12,795
  • 5
  • 39
  • 47