Catalina - OS needs user's permission for desktop on every rebuild

Please excuse me if this is an obvious question, I tried Googling, but all the results are for instructions for users of released products.


I have a small proof-of-concept bit of code that I'm working on which involves traversing the filesystem. I have a test folder on my desktop which the code walks though.


Every time I build and run in Xcode I have to grant permission to the app to access the desktop. Is there a way to permanently grant access to my target whilst I'm in development?


Thanks.

Replies

Is there a way to permanently grant access to my target whilst I'm in development?

The majority of problems like this are the result of the program not having a stable code signature. Ad hoc code signing (Sign to Run Locally in Xcode) is not stable. The system can’t tell that version N+1 of your code is the same program as version N. To fix this, switch to code signing with an identity, typically Apple Development.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"