I'm trying to use an SFAuthorizationView within a Preference Pane to present a user experience similar to system preference panes (e.g. Date & Time, Users & Groups, etc.) such that there is a lock icon. When the lock icon is clicked, I'd like it behave just like the system preference panes.
There are two issues that I've found:
1. When the lock is clicked, the dialog prompting the user for credentials is not presented as a sheet. Instead, it is a modal dialog window.
Is there some way to present the view as a panel/sheet similar to some of SFAuthorizationView's cousins? Clearly there is a way to do this since the system preferences do this.
2. On Mojave and earlier, the environment prompt text in the dialog is: "System Preferences wants to make changes." On Catalina, the environment prompt text in the dialog is "legacyLoader wants to make changes."
This difference in behavior between macOS versions is a problem. Clearly, the environment prompt text is being derived from the process that runs the preference pane. Is there some way to modify the environment prompt text? If I were able to create the authorization with AuthorizationCreate() passing an AuthorizationEnvironment, I could change the environment prompt according to my needs.
However, this doesn't appear to be possible with the limited methods available to SFAuthorizationView. The only thing remotely related is setAuthorizationRights: and when you add additional AuthorizationItems to the AuthorizationRights, they're apparently ignored.
Is there a solution to these short of having to write my own implementation?
Thanks.