Xcode does not request microphone permission

Since yesterday my Xcode started to have no access to microphone.

Xcode: 11.5

MacOS: Catalina 10.15

This is confirmed with checking Mac "system preference" -> "security and privacy" -> "microphone". XCode is not listed there.


The problem: I don't know how to add Xcode back to the microphone permission list. Xcode does not prompt for this. I tried to reset Xcode. No success. I tried to manually uninstall it and reinstall it. No success. The manual unstall I did should remove everything. It includes:

  1. /Library/Preferences/com.apple.dt.Xcode.plist
  2. ~/Library/Caches/com.apple.dt.Xcode
  3. ~/Library/Developer
  4. ~/Library/MobileDevice
  5. ~/Library/Preferences/com.apple.dt.Xcode.plist


However, when I re-install Xcode, it is still the same. Xcode is not listed in microphone permission list and it does not promp for authorization either.


Anyone please help.


(background: I was working an IOS app where I record audio and play back the audio. It was working okay but yesterday it started to have problem with the AVAudioRecorder. When running simulator iPhone 11, it complains:


PropertyID=1667788144 is NULL


After some searching I pretty much nailed down it's because the app has no access to the microphone. I understand I need (1) Xcode has access to microphone and (2) the app has access to microphone.


Indeed when I check the Mac "system preference" -> "security and privacy" -> "microphone", I do not see Xcode is listed there. Moreover, my app indeed ask for microphone permisson with no problem. And that is confirmed with AVCaptureDevice.authorizationStatus(for: .audio). It is indeed "authorized". Therefore my only suspect is Xcode has no permission for microphone. This is the background. Please help. )

I have the same (or very similar issue).
I first noticed the issue first in macOS 10.14, prior versions did not show this message.
I have isolated the function call which causes the error message:
Code Block err = AudioQueueSetProperty(_sndAqData->mQueue, kAudioQueueProperty_EnableLevelMetering, &meteringEnable, sizeof(meteringEnable));

I checked _sndAgData->mQueue but everything in there is valid.
My application has access to the Microphone and microphone recording is working fine.

I would dearly love to find out what property has ID=1667788144

Xcode 11.5
Catalina 10.15.5

Code that cause the error message:

Code Block
err = AudioQueueSetProperty(_sndAqData->mQueue, kAudioQueueProperty_EnableLevelMetering, &meteringEnable, sizeof(meteringEnable));


I have the same problem. How can I solve this issue. Im not understanding the error message and i am unable to find the error code written by helioz2000
Xcode does not request microphone permission
 
 
Q