Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

Prevent from asking external drive access permission

Hi,


I am using Visual Studio Code for compiling C++ into an external drive. The issue is that each time I compile and run, macOS asks for access to external drive permission for the executable just created.


Some notes:

  • vscode has granted access to external drives.
  • C# .Net build and run does not ask for external drive access permission.
  • If, instead build and run, I compile, then open a terminal and run the executable manually, it does not ask for external drive access permission.


It's weird as if you want to build and run (or debug) directly is always asking for permission, and the executable (i.e. helloworld) is added to Privacy & Security files and folders list of programs, so think when we make, compile and run many different programs...


Is there some way to give the target folder permissions or extended attributes to prevent the system from asking access to external drive permission when accessing that folder?


Thanks.

Mac mini (M1, 2020)

Posted on May 16, 2024 4:20 AM

Reply
3 replies

May 18, 2024 10:07 AM in response to DarkSchneider_

I suspect you’ll have to implement code signing in your environment, as it appears your chosen IDE doesn’t.


For command-line tools, here’s some background on app signing:

TN3127: Inside Code Signing: Requirements | Apple Developer Documentation


This isn’t the best spot for third-party IDE questions, though. Ask in a VSC forum? I’d think VSC would deal with this better, so check for docs and updates?


As for some random app accessing an external device (if this isn’t due to code signing), that does require permission. But I’m entirely unclear how VSC works in this regard—.the command line and Xcode and Playgrounds are more common around here.


Prevent from asking external drive access permission

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.