Does someone know how to read the setting for an application in System Preferences -> Security & Privacy -> Privacy -> Contacts -> [the application]
I want to know if it is listed, and if so, if it is ckecked or unchecked.
Thanks in advance!
Tips on how to do this with the MBS-plugins are also welcome.
I don’t think there is a way to check, but apparently if you request the sharedAddressBook it will return Nil if you don’t have access, otherwise you will get the sharedAddressBook…
If I do that, MacOS comes with a dialog ‘The application wants to access your contacts’ every time one presses ‘Cancel’. Some people do, you know.
So, to prevent this, I was thinking about a pre-check and pop-up my own dialog and set a preference in my app.
Now that I think about it, I can do the same when I don’t get access. Pop-up a dialog after the user presses ‘Cancel’ and store this in a pref-setting. Although I like the pre-check more.
Looks like what you want to do can be done through the new Contacts framework (which replaces the AddressBook framework)…
Christian, you got something for this?
nice find but beware it only works after 10.11
ahh… yes, I forgot to mention that, but the Contacts framework, is the new one that works on all of Apple’s devices…
Christian, took you long enough to post… Did you have to code the plugin?
I was traveling this week and had a limited time to check forum.
hehe… Just teasing ya… I didn’t know MBS could do the new Contacts otherwise I would have mentioned it…