How do I allow Xcode to access the microphone?

痞子三分冷 提交于 2020-03-04 18:30:50

问题


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?

来源:https://stackoverflow.com/questions/59996178/how-do-i-allow-xcode-to-access-the-microphone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!