iPhone simulator asking for microphone access

I don’t know if that’s something related to cocos2d-x, but recently in our cocos2d-x projects when ran on simulator, it asks for microphone permission. On top of that if you don’t allow it in few seconds it, I’ll crash the app instead somewhere on sounds loading. It also doesn’t happen always - sometimes it does few times in the row, sometimes doesn’t happen at all - even If I close the simulator and open it again. What’s going on? Do someone have the same issue? No problem on devices anyway.

2 Likes

Confirm the same problem on iPhone simulator.
Don’t know why.

Are you on Mojave? Might be this…

https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes?language=objc

Under “known issues”

  • On macOS 10.14, Simulator might prompt for Microphone access at launch or when first interacting with the microphone in a simulator (for example, by using Siri). If you decline permissions, simulator audio sessions will not be able to use audio input of any kind, regardless of the permissions granted inside a simulator. Use the macOS System Preferences, Security & Privacy preference pane to change this setting.Your application must still be granted Microphone permission inside the simulator as well. macOS applies its permission policy to Simulator application as a whole, across all simulator runtime versions and all applications inside a simulator. Each simulator applies permission policies to individual applications just like devices. (40113388)
3 Likes

Thanks. It’s strange tough, because in Security & Privacy -> Microphone I only have Xcode and it’s already checked. Yet still it asks for microphone over and over.

I’ve given up on Mojave short-term (6mo), for sanity purposes :smiley:
I’ll probably test out all projects once or month to check-in on where it’s at, but for now it feels like a buggy mess (could also just be XCode10 or the combo of both, but meh).

1 Like

It’s probably Mojave. Yesterday I ran an old project created in libgdx-robovm via android studio in iOS simulator and it also asks for microphone permission.