title: iOS App asks for microphone access, even for kAudioSessionCategory_MediaPlayback
body: <p>I'm using the Novocaine library from: <a href="https://github.com/alexbw/novocaine" rel="nofollow">https://github.com/alexbw/novocaine</a> to playback wav files. I know that iOS has its own media player API however its limitation is in the preset equalizers. I need to use Novocaine because I am using NVDSP <a href="https://github.com/bartolsthoorn/NVDSP" rel="nofollow">https://github.com/bartolsthoorn/NVDSP</a> to implement a 10-band graphic equalizer.</p>
  
  <p>Apple rejected my submitted app because it asks for microphone access but it is only a playback app. They said:</p>
  
  <p><em>"The microphone consent request is generated by the use of either AVAudioSessionCategoryRecord or AVAudioSessionCategoryPlayAndRecord audio categories"</em></p>
  
  <p>In Novocaine.m, I modified the setupAudio from</p>
  
  <pre><code>UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord
  </code></pre>
  
  <p>to each of these:</p>
  
  <pre><code>UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback
  UInt32 sessionCategory = kAudioSessionCategory_AmbientSound
  UInt32 sessionCategory = kAudioSessionCategory_SoloAmbientSound
  </code></pre>
  
  <p>but in each of the above cases, the app still requested microphone access.</p>
  
  <p>I searched all the code and this is the only place where the audio session category is set.</p>
  
  <p>To test, after every modification, you have to do this on the iPod:</p>
  
  <p>Settings -> General -> Reset -> Reset Location &amp; Privacy</p>
  
  <p>otherwise the test is not valid.</p>
  
  <p>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.</p>
  
  <p><strong>Is there any other place in the code that requests microphone access or which affects microphone access as a side-effect?</strong></p>
  
  <p><em>I'm using XCode 5.0.2 (5A3005) with iOS SDK 7.0, and my only test device is an iPod Touch 5th generation.</em></p>