How to request Microphone Permisson for Mac OSX Standalone?
I am having a lot of difficulty with triggering the Microphone Permissions prompt for Mac OSX Standalone build. All of the documentation is either for Android or IOS. I have implemented this code from the Application documentation (https://docs.unity3d.com/ScriptReference/Application.RequestUserAuthorization.html)
But it does not ask for permission when the code is run. I have also modified the info.plist in XCode to include the "Privacy - Microphone Usage Description".
Is there anything I am missing? Our app is heavily dependent on voice chat and this has been a blocker for releasing on Mac for awhile.
I appreciate your assistance! Thanks!
Answer by VWAStudios · May 26, 2020 at 10:48 AM
We've spent some time trying to get voice permissions as well while using Vivox. While it would attempt to join a channel, it would fail silently and not actually allow the microphone to transmit.
We discovered that in addition to ensuring NSMicrophoneUsageDescription
was in the plist in the mac app bundle package Contents when built, these entitlements also needed to be set:
com.apple.security.device.audio-input
com.apple.security.device.microphone
Then the signtool must be run (and a cert may be required)
Both the plist and entitlements must be done. Only modifying the plist may cause the app to crash or fail to open as reported here: https://forum.unity.com/threads/opt-in-permissions-and-info-plist-in-macos-catalina.875461/
https://stackoverflow.com/questions/49595811/macos-entitlements-audio-input-vs-microphone
https://docs.unity3d.com/Manual/HOWTO-PortToAppleMacStore.html
We had problem with VIXOX integration, microphone was silent. This solved it, marked as correct answer.
Your answer
Follow this Question
Related Questions
How to check microphone permission in game on MacOS? 0 Answers
Create folders on mac 0 Answers
POLYBRUSH NOT WORKING ON MAC 0 Answers
Unity 2017.3.1f1 crash after Developer Tools on Mac request access 8 Answers