I am developing a Mac OS app that accesses information like capturing the computer screen or controlling the mouse. (The app is just for personal use)
This works fine in the beginning. When my app tries to access a feature, I get asked to allow this in the system preferences (See dialog below) and if I do so, I can access the content. And as long as I don't change anything in my code I can rerun the app as often as I want and the permissions stay intact.
My issue is that every time I change something in the code, I also need to grant the permissions again to the app. Can someone please help me and explain why and what I can do to prevent this?
Mac OS: Catalina 10.15.7
Thanks so much for the help!
So even if it seems that you actually have to uncheck and check the box in the privacy settings over and over again, this doesn't mean you have to do it yourself all the time.
What helped me is recording an Automator workflow that checks the boxes for me. You can then run this workflow in a build phase to run it on every build.
Steps:
You will need to leave the Security & Privacy settings window open if you didn't include a step in your workflow to actually open it beforehand.
Now when you build/run the app the Automator script should do the work for you and the Privacy settings should be setup correctly.