Accessibility permissions while developing clicker app?

I'm writing a little helper app that sends mouse clicks and keystrokes. It is extremely cumbersome, because whenever I change some code I have to grant it permissions again in the Accessibility section in the "Security & Privacy" system preferences. I have to try out a lot of things to see if and how they work and every time I have to switch to the system preferences, delete the old version of my app, compile and run the new version in Xcode, switch to system preferences again, grant permissions and then I can finally switch to my app to try it out. While this is fine for the finished product, is there any way I can avoid this during development? Otherwise writing such an app would be practically impossible. I really need to be able to just run it after a recompile.

Replies

This privilege is controlled by TCC and, as a general rule, TCC uses code signatures [1] to track such privileges. Make sure that your app is signed with a stable signing identity, that is, not unsigned and not ad hoc signed (Signed to Run Locally in Xcode terms).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Specifically, the designated requirement, as discussed in TN3127 Inside Code Signing: Requirements.