From a developer perspective, it bothers me that there already were several types of API to request or check for permissions. For the address book, one has to try to access and "risk" a UI being shown to ask permission. This meant that the call could block and be made at a time where it did not startle the user. There is no way to check if permission has previously been requested, granted, or denied.
For other data, like calendar, there is API to check permission status. This makes it much easier to adapt application behavior to user preferences. This appears to be the more modern approach. It seems address book only took the other approach to retain API compatibility. Though I would appreciate to see additional API to check on permission status.
In Mojave, Apple adds new categories of protected data. This is fine. What bothers me is that we again get a bucnh of different behavior and API styles. For Photos and certain file access we get the behavior seen in address book. Not the best. For Mail we get a silent failure. The silent failure may actually be an improvement. It allows for partial checking of the authorization status. If listing the contents of ~/Library/Mail fails, the user either has not yet been asked or has refused access. The catch here being that there is no API to ask for permission to access.
The new process to grant access to app data is unduly complicated on both the developer and the end user:
- The developer has no way to distinguish between situations where the user has not made a decision yet and situations where the user has refused access
- There is no API to request permission
- The user needs to be directed to System Preferences
- In System Preferences, the user needs to pick the correct pane to grant permission. She has to do se without the benefit of a permissions string (or privacy statement) that explains why the application needs access
- The user needs to manually add the application to the list. This is in stark contrast to Accessibility preferences, where the apps are already listed and th user only needs to add a checkmark
- The "+ / Add" button opens a NSOpenPanel rooted in the Documents folder - the most unlikely place to find applications. At the very least, this should point to the Applications folder. Better yet, select the last used application
I will submit bug reports / feature requests to suggest the following:
- There should be an API that pops up an alert to ask for permission to access application data. This should show a description string from Info.plist. Much like access to Calendar does.
- The System Preferences pane should list all application, or running applications, or applications that have recently tried to access protected application data.
- There should be API to check if the user has granted or refused permission. E.g. if the user added an application to the list in System Preferences and unchecked it, that could be understood as explicit refusal.