qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.62k stars 218 forks source link

Feature Request: Microphone Permissions #989

Open rleathart opened 1 year ago

rleathart commented 1 year ago

Hiya, thanks for making the best vim GUI for mac!

Slightly odd request but would it be possible for VimR to optionally be added to the list of applications with microphone access in System Preferences -> Security & Privacy -> Privacy -> Microphone? I am an audio developer and sometimes I want to run binaries that require microphone access from the neovim :term terminal. Since the parent process (VimR in this case) needs to have microphone permissions in order for audio input to work I have to either open iTerm, or run my process as a macOS bundle rather than a unix executable which is a little bit of a pain.

AFAIK, the relevant Objective-C API calls are

[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL granted) {}];
[AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio];

Thanks, Robin