Stop the message "appName would like to access the microphone"

tl;dr don't need microphone access, not sure why system thinks I do, want to stop message from appearing with each simulator launch.


I recently upgraded our dev machine to Mojave. I waited because I didn't want any unexpected surprises with our project to delay us. Unfortunately I ran into one problem that is driving me crazy. Every time I launch my app in the simulator the mac asks me "(appName) would like to access the microphone." with an "Allow" or "Cancel" button. My app has no intentional microphone access. (Note: My app does ask for photo album access but I am not sure why that would be relevant.)


In any case, I would like to disable this dialog in any way possible. Any of the following are accetable to me.

1. Removing offending code when run in the simulator (but like I said I don't know what is causing it).

2. Some way of whitelisting my app?

3. Some change to the system settings to prevent the dialog from appearing.


Please help!!


MacOS: 10.14

XCode: 10.1

Replies

After install the newest beta version of xcode(10.2), and then build and run my project in release version(10.1) again, the alert dialog goes away.

Mojave adds the ability to have Siri running inside an App which may be why this problem started with Mojave. But the App I am developing does not have this capability enabled.


In seeing this problem ONLY when I have ads enabled in the simulator. Some test ads will display and then this pop up will occur. I have ads disabled when doing TUI tests but enabled when running. So, maybe we don't need Google or FaceBook to gleen are data the Advertisers can just listen in. :')


Not sure if runing UITest would bring up the App enough to allow ads but TUI test could. TUI test needs to "Idle" to progress through the test and I am not sure if it would do this if ads were running.

This does not help CI testing, because the prompt still appears (only once per app, but CI starts from scratch each time).

Xcode doesn't show up for me under microphone.

This is the best solution https://stackoverflow.com/a/54371332/11368247