0

I am running Xcode 10.2 on Mojave 10.14.6. I am rewriting the example code from the book "Learning Core Audio" into Swift. Two of these examples capture audio from the standard input device, one uses AudioQueueServices to write the captured data to a file while the other uses a ring buffer to pass it directly to the standard hardware output.

Both are command line tools and both work as intended when I run them from the terminal. On the first launch I was asked to give terminal permission to use the microphone.

However, when I run them from Xcode, no audio is captured, as Xcode has no permission to access the microphone. The prompt to ask for permission simply does never appear.

In SystemPreferences -> Security and Privacy -> Microphone there is no entry for Xcode and I cannot manually add anything.

Is there a way to force Xcode to ask me for this permission, or is there another way to manually add Xcode to the whitelisted apps for microphone access?

Cœur
  • 37,241
  • 25
  • 195
  • 267
MassMover
  • 529
  • 2
  • 17
  • Is it really Xcode that is capturing audio or the apps being debugged by Xcode? – trojanfoe Feb 03 '20 at 09:24
  • As I wrote: when I ran the command line app for the first time outside XCode I was prompted to give permission to use the microphone to the terminal, not the app. So I think it is safe to assume that also when started from XCode it is similar behavior. – MassMover Feb 08 '20 at 00:39
  • By any chance did you find the solution to this? I’m facing a similar issue here: https://stackoverflow.com/questions/75850835/how-to-get-the-list-of-input-devices-on-macos-using-coreaudio?noredirect=1#comment133805126_75850835 – user159925 Mar 28 '23 at 19:50

0 Answers0