2

I am on OSX 10.14, XCode 10, objective-c

I am currently developing a workflow for explaining the user why he needs to accept automation for my app, explaining how to manually activate it and so on.

For testing reasons it would be great to remove my listed app in the system preferences so i can test this process multiple times.

E.g. in the picture: How can i completely remove Google Chrome for example?

enter image description here

EDIT: Im not able to open the TCC database where this information is stored:

enter image description here

Pat_Morita
  • 3,355
  • 3
  • 25
  • 36

2 Answers2

1

These permissions are stored in the TCC database, for your current user:

~/Library/Application Support/com.apple.TCC/TCC.db

This is a SQLite database, so you can edit them with the editor of your choice.

The table is called access.
Applications listed in Automation will have kTCCServiceAppleEvents as service.

You can simply remove them and save the database.

EDIT

This is not the global TCC database stored in /Library, which is protected by SIP.
Note the ~, meaning it's in your user's folder: /Users/xxx/Library/...
This one is editable even with SIP enabled.

EDIT 2

So looks like the local TCC database is also protected.
Filesystem protection is only affective for apps built against the macOS 10.14 SDK - that's why I was able to edit it with some third party client.

So I guess the only solution is to disable SIP unfortunately.

Macmade
  • 52,708
  • 13
  • 106
  • 123
  • in OSX 10.14, its not possible to edit this file (even with sudo) due to SIP – Pat_Morita Sep 28 '18 at 11:19
  • Unfortunately not, in 10.14., SIP enabled, that file is protected and sudo doesnt work: "sudo nano /Users/admin/Library/Application\ Support/com.apple.TCC/TCC.db" . --> Fails – Pat_Morita Sep 28 '18 at 11:59
  • @Pat_Morita That's weird... I'm using Navicat Essentials and I can open and edit the database. Other clients fail, including the built-in `sqlite3` tool. – Macmade Sep 28 '18 at 18:25
0

I can confirm that the database can be edited if SIP is removed, both with sqlite3 as well as UI tools like SQLiteManager.

Matthias Nott
  • 301
  • 2
  • 4