16 lines
329 B
Swift
16 lines
329 B
Swift
import Foundation
|
|
import ServiceManagement
|
|
|
|
struct LaunchAgentController {
|
|
|
|
func install() -> Bool {
|
|
_ = setEnabled(false)
|
|
return setEnabled(true)
|
|
}
|
|
|
|
private func setEnabled(_ enabled: Bool) -> Bool {
|
|
SMLoginItemSetEnabled("com.maxgoedjen.Secretive.SecretAgent" as CFString, enabled)
|
|
}
|
|
|
|
}
|