Asking for permission to access Microphone

XCode 10.1

Corona Native (used to use Enterprise) 2018-3326

Updated to these releases. My last released build was around October 2017.

When I run my app in XCode Simulator, I get an alert asking permission for my app to access the Microphone.

I am not using the microphone in my app, and have changed no code that would suggest that I am. I don’t know where to look to try disabling using of the microphone or to keep this alert from popping up for my users.

Suggestions where to look?

-Tom

The microphone is part of the core of Corona. You can include a plist entry in your build.settings that controls the message the users see when they get the alert.

Rob

Rob,

Thanks. I’m trying to suppress use of the microphone or the alert, so that my users don’t suddenly think my app is listening to them.

Is there a way to do that?

Otherwise, what is the build.settings entry I need?

-Tom

The plist entry is:

NSMicrophoneUsageDescription = "text to show when asking for permission"

You can say something like “This app does not use the microphone”. I doubt that your app is actually showing this dialog. If I’m correct, Apple is scanning the uploaded file and looking for the library/framework that uses the microphone, which is included with your app. Then they scan the Info.plist file to see if you’re asking for permission. If they don’t find that UsageDescription string, they throw an error. Your app shouldn’t actually show a dialog unless you’re trying to use the microphone.

I could be wrong and if I am we will have to look at a different approach.

Rob

Added the NSMicrophoneUsageDescription = “Not used within app” to the PLIST section of build.settings, with the same result: still asks permission, with subtitle “Not used within app”.

Did you add that to build.settings or to the Info.plist? If you’re doing native builds, we don’t process build.settings for any of the plist items.

Just to verify, you’re getting this without submitting to Apple, but simply running in the Xcode simulator?

Does it happen if you try and build and run a fresh “App” project?

Rob

For completeness sake: I added it to build.settings. The string I entered was displayed in the Microphone alert. This alert is only displayed in the simulator.

I just tried the app on my phone, and it doesn’t display the microphone alert. It seems to be only an annoyance in the simulator.

Thanks for the input and help!

-Tom

The microphone is part of the core of Corona. You can include a plist entry in your build.settings that controls the message the users see when they get the alert.

Rob

Rob,

Thanks. I’m trying to suppress use of the microphone or the alert, so that my users don’t suddenly think my app is listening to them.

Is there a way to do that?

Otherwise, what is the build.settings entry I need?

-Tom

The plist entry is:

NSMicrophoneUsageDescription = "text to show when asking for permission"

You can say something like “This app does not use the microphone”. I doubt that your app is actually showing this dialog. If I’m correct, Apple is scanning the uploaded file and looking for the library/framework that uses the microphone, which is included with your app. Then they scan the Info.plist file to see if you’re asking for permission. If they don’t find that UsageDescription string, they throw an error. Your app shouldn’t actually show a dialog unless you’re trying to use the microphone.

I could be wrong and if I am we will have to look at a different approach.

Rob

Added the NSMicrophoneUsageDescription = “Not used within app” to the PLIST section of build.settings, with the same result: still asks permission, with subtitle “Not used within app”.

Did you add that to build.settings or to the Info.plist? If you’re doing native builds, we don’t process build.settings for any of the plist items.

Just to verify, you’re getting this without submitting to Apple, but simply running in the Xcode simulator?

Does it happen if you try and build and run a fresh “App” project?

Rob

For completeness sake: I added it to build.settings. The string I entered was displayed in the Microphone alert. This alert is only displayed in the simulator.

I just tried the app on my phone, and it doesn’t display the microphone alert. It seems to be only an annoyance in the simulator.

Thanks for the input and help!

-Tom