Gain administration privileges with swift for a Mac Application
问题 I am writing a pice of software that needs to often run a command with root privileges. Right now, I am doing this by asking the user for their password once, saving it and then providing that password to NSAppleScript as an argument along with with administrator privileges . This obviously is really insecure for the user as someone could gain access to their password. I've been searching for a better part of a week and cannot find the solution. SMJobBless seems to allow you to install your