Search Issue Tracker

By Design

Votes

0

Found in

2020.3.48f1

Issue ID

UUM-42609

Regression

No

[iOS] Application.RequestUserAuthorization does not prompt for microphone access permission

-

How to reproduce:
1. Create a new project
2. Create a gameobject and add a script component
3. Inside the script, use the following code:
void Start()
{
StartCoroutine(MicPerms());
}

// Update is called once per frame
void Update()
{

}

IEnumerator MicPerms()
{
yield return Application.RequestUserAuthorization(UserAuthorization.Microphone);
}
4. Add Microphone usage description under Player Settings for iOS
5. Build and run the application on iOS

Expected result: permission for Microphone usage is prompted
Actual result: permission for Microphone usage is not prompted

Reproducible with: 2020.3.48f1, 2021.3.28f1, 2022.3.4f1, 2023.1.3f1, 2023.2.0a23

  1. Resolution Note:

    If project doesn't use Microphone class, Unity sets UNITY_USES_MICROPHONE define to 0 in Preprocessor.h and permission request/mic itself doesn't work. Using this class in some way (such as querying Microphone.devices.Length after permission request) will set define to 1 and permission request will work. Setting define manually to 1 will work too.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.