Command Line Tool doesn't trigger permission prompt for audio recording

Hello,

I'm developing a Command Line Tool in XCode, in order to capture system audio and save it to a file, which will then be used by a separate process.

Everything works perfectly when running it from either XCode or the native terminal application (see image below), but as soon as I try to run it from any 3rd party application, it doesn't ask for permissions to record sound, and the resultant file ends up soundless.

When archiving it and then running it from other 3rd party applications, e.g Warp (terminal) or spawning it as a child process from a bundled Electron application, it doesn't ask for permissions.

Things of note:

As my use-case involves spawning the executable from Electron as a child process, I've tried to include the appropriate permissions to the parent application too, without success.

I'm really at a loss here, it feels like I've tried everything. Any pointers are much appreciated!

Thanks

Command Line Tool doesn't trigger permission prompt for audio recording
 
 
Q