unregister()
Unregisters the service so the system no longer launches it.
Declaration
func unregister() throwsDiscussion
This is the opposite operation of register().
If the service corresponds to a LoginItem, LaunchAgent, or LaunchDaemon and the service is currently running it, the system terminates it. If the service corresponds to the main application, it continues running, but becomes unregistered to prevent future launches at login.
If the service is already unregistered, this method returns kSMErrorJobNotFound.