Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Asking for permission to access Microphone
Started by tbuchler Nov 11 2018 05:47 AM

6 replies to this topic

Best Answer tbuchler , 14 November 2018 - 11:09 PM

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

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

tbuchler

[GLOBAL: userInfoPane.html]
tbuchler
  • Enthusiast

  • 56 posts
  • Corona SDK

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

 

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,133 posts
  • Corona SDK

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



[TOPIC: post.html]
#3

tbuchler

[GLOBAL: userInfoPane.html]
tbuchler
  • Enthusiast

  • 56 posts
  • Corona SDK

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



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,133 posts
  • Corona SDK

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



[TOPIC: post.html]
#5

tbuchler

[GLOBAL: userInfoPane.html]
tbuchler
  • Enthusiast

  • 56 posts
  • Corona SDK

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".



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,133 posts
  • Corona SDK

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



[TOPIC: post.html]
#7

tbuchler

[GLOBAL: userInfoPane.html]
tbuchler
  • Enthusiast

  • 56 posts
  • Corona SDK

  Best Answer

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




[topic_controls]
[/topic_controls]