Resetting a Privacy Choice on macOS
• 1 minute read
macOS shows a privacy choice prompt for certain aspects like the address book only when an app requests access the first time. This simple terminal command erases the saved choice.
When developing an app that (in example) accesses the user’s address book, the user must approve or decline that access. The choice is remembered and the user can update it on the system settings. The system’s approval dialog is not presented again whenever the app requests access again because the user already chose. During development and testing of an app you likely have to provoke the presentation of the system dialog multiple times, though.
It took me some time to dig up this gem in the documentation archive of Apple. Basically it boils down to this shell command on macOS:
tccutil reset AddressBook
The next time you request access to the address book in code the system will prompt you again for approval or denial.