Reputation: 771
Since upgraded to macOS Mojave, I find there are permission restrictions to user from accessing ~/Library/Safari/Bookmarks.plist
. So is there an alternative way to do it programmatically? Is there a SafariKit
or something I can use to import bookmarks to my own program? I tried to search online, but no one mentions anything about it. If you guys know, please help me. Thank you
Upvotes: 2
Views: 1809
Reputation: 70098
You cannot access ~/Library/Safari/Bookmarks.plist anymore because of the stricter security rules in Mojave.
I don't think there's an API to do this specific action yet, so the solution for now is to add the application yourself to System Preferences > Security > Confidentiality > Disk access
.
For example if you add Terminal.app to this Confidentiality subgroup, this will grant access to the whole disk to all commands executed in Terminal, inluding using cat/vim/... to access ~/Library/Safari/Bookmarks.plist.
Upvotes: 4