alexbw / novocaine

Painless high-performance audio on iOS and Mac OS X
http://alexbw.github.com/novocaine/
MIT License
2.23k stars 273 forks source link

App asks for microphone access, even for kAudioSessionCategory_MediaPlayback #70

Open simplytech opened 10 years ago

simplytech commented 10 years ago

Thanks for a great library!

Apple rejected my submitted app because it asks for microphone access but it is only a playback app. They said:

"The microphone consent request is generated by the use of either AVAudioSessionCategoryRecord or AVAudioSessionCategoryPlayAndRecord audio categories"

In Novocaine.m, I modified the setupAudio from

UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord

to each of these:

UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback
UInt32 sessionCategory = kAudioSessionCategory_AmbientSound
UInt32 sessionCategory = kAudioSessionCategory_SoloAmbientSound

but in each of the above cases, the app still requested microphone access.

To test, after every modification, you have to do this on the iPod:

Settings -> General -> Reset -> Reset Location & Privacy

otherwise the test is not valid.

I single-stepped through almost all of the Novocaine code with the XCode debugger, but it is very difficult to diagnose, because the microphone access popup only shows when the view is displayed, however, the check for it happens much earlier in the code.

Is there any other place in the code that requests microphone access?

I'm using XCode 5.0.2 (5A3005) with iOS SDK 7.0, and my only test device is an iPod Touch 5th generation.

alexbw commented 10 years ago

Is this still an open issue?

notlion commented 10 years ago

Apps still request microphone access, even when there is no input block set. It would be nice to have explicit control over when the request happens, since it interrupts the user.

LukaszGrela commented 10 years ago

I can see the same, with default iOS example audio playback.

esphynox commented 10 years ago

is there fix for this issue?