3

We've almost finished porting our app to iOS7, but we've ran into an issue that AVPlayer defaults playback on the iPhone to the receiver (quiet speaker) instead of regular loud speaker. A solution for that appears to be using

AVAudioSession* session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryPlayback ...];

this, however, on iOS7 pops up a dialog requesting microphone permission. Why? How can I avoid this, as the app doesn't record anything? We're using AVPlayer for playback and also have background audio permission.

Axarydax
  • 16,353
  • 21
  • 92
  • 151
  • would a better title for this question be "audio playback on iOS 7 now requests microphone access"? – Michael Dautermann Nov 03 '13 at 13:12
  • I have posted this question 1 month ago and still no answer :/ ... http://stackoverflow.com/questions/18916044/using-a-bluetooth-sound-device-in-ios7-without-microphone-permissions – Tiago Almeida Nov 03 '13 at 16:30

1 Answers1

0

Have you tried to override output rote of Audio session? I've had similar problem on iOS 6 when sound was played on loudspeaker on iPod but on phone speaker on iPhone.

UInt32 audioRoute = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, sizeof(UInt32), &audioRouteOverride);
grandboum
  • 622
  • 4
  • 5
  • It says that the function `AudioSessionSetProperty` is deprecated in iOS7 – Axarydax Nov 06 '13 at 14:47
  • but it still asks for the microphone permission on iOS7 and iPhone 4, so this isn't the cause – Axarydax Nov 06 '13 at 14:50
  • My bad, didn't see that changed. Maybe this could help? http://stackoverflow.com/questions/18807157/how-do-i-route-audio-to-speaker-without-using-audiosessionsetproperty – grandboum Nov 06 '13 at 14:51
  • I'm using almost exactly that, the sound does actually go to the loudspeaker, but the app is asking for microphone permission (that is the point of this question) – Axarydax Nov 06 '13 at 18:11