How to grant full disk access to mac app built in Xcode

Viewed 188

I have a macOS app that when I build it in Xcode, it does not have full disk access even though I've added it to the full disk access option under security and privacy. The weird thing is that when I open the app from the derived data directory or an archived version, it has the necessary permissions. Xcode also has full disk access as well. I was previously on Xcode 11.3 and this wasn't an issue. I suspect it has something to do with updating to Xcode 12.4 as I have this issue on 10.15 and 11. I am at a total loss as to how to fix this.

1 Answers

I had this problem when I created a new app, "Psiexp22", with Xcode 13.4.1 (did not have problem rebuilding projects created with earlier versions) This version of Xcode creates sandboxed apps by default. Selected Psiexp22:Psiexp22:Psiexp22.entitlements in Xcode sidebar and changed "App Sandbox" value from YES to NO and now have disk access.

disable sandbox to enable full disk access to an app built with Xcode 13.4.1

It would be cool to figure out how to put up one of those '"Psiexp22.app" would like to access files...' alerts, but life is too short to go down that rabbit hole

Related