I am trying (programmatically) to detect an OSX administrator password prompt that appears when changing system security settings. Ideally, solutions will work for C ++ or Objective-C. I looked at various NSDistributedNotificationCenters that provide OS notifications, but none of them seem to be specific to the password hint. I tried registering for all the notifications that the OS can provide, but these notifications seem to stop as soon as I enter the System Preferences window.
I also looked at the concept of SFAuthorizationPlugin , but it seems like more to login from a cold boot.
I know this is possible, as I have seen other applications detect a password prompt and display something on the screen whenever it appears.
So, how can I programmatically determine the OSX admin password prompt?
source share