I am building a window manager that requires the use of the Accessibility API for macOS. My code works fine if I build the app, grant the debug build accessibility permissions in the Security and Privacy panel, and then run my code. But if I change any code, I have to regrant the permissions manually and it is incredibly laborious to do between each build.
How can I persist the permissions between builds? I see this is an issue elsewhere and I have tried all the tactics I found on Stack Overflow so far.
- Auto allow access to MacOS accessibility API during development
- MacOS Monterey 12.2.1 Keeps Asking for Accessibility Permission for an App When Launched from XCode 13.2.1 Even After Granting the Permission
- How to prompt for accessibility features in a macOS app (from the AppDelegate)?
CodePudding user response:
Figures I would solve this right after I post it.
The App needs to be signed with a certificate following this process to keep continuity between builds.
If your Apple ID is already hooked up to XCode and you have a developer account, I went to the "Signing and Capabilities" section in the App Targets section and updated "Signing Certificate" to "Development".