patrick patrick - 1 month ago 19
iOS Question

NSMicrophoneUsageDescription required even though its not used?

I just tried submitting my app and I got an email saying:


This app attempts to access privacy-sensitive data without a usage
description. The app's Info.plist must contain an
NSMicrophoneUsageDescription key with a string value explaining to the
user how the app uses this data.


I am using The Amazing Audio Engine, but I am not using the microphone at all anywhere in my code. So I am assuming Apple is seeing my binary includes TAAE and that has methods involving the microphone, even though they are not being used.

So my question is, is there a way to get around this? Should I remove the headers for the audio recorder files? Or am I forced to have my app give an alert that it needs to use the microphone even though it never will (bleah!!!) ?

Answer

Apple can see that there is code that accesses the microphone. There is no way that Apple can tell that during the run of your app, that code isn't actually accessed.

So you have two choices:

  1. Keep using TAAE (which includes code that does access the microphone even if your app doesn't use it), and provide the NSMicrophoneUsageDescription key in Info.plist. The user will never see this as long as your app doesn't ever trigger the use of the microphone.
  2. Eliminate the use of TAAE from your app.