I'm working on a Mac app that will optionally provide the ability to install some extra software that's in apple package format. This package requires elevated (root) privileges to install, and instead of bothering with a helper tool or AuthorizationExecuteWithPrivileges()
, I figured it would be easier to use NSTask to call /usr/bin/open
or even /System/Library/CoreServices/Installer.app/Contents/MacOS/Installer
with the path to the package and let it handle the user authorization.
So, it works all fine and dandy, but the Installer window does not appear at the front of the stack, nor is it ever key. I can orderOut
the calling window before launching the task and that helps with the ordering, but the key is really going to be, well, making it key.
Should I just go ahead and implement Apple's BetterAuthorizationSample
since I'll probably have to use it at some point in the future, and since it will make be a better person for having tried?