CloverBootloader/CloverApp/Clover/RunAtLogin.swift
vectorsigma72 c8969630f3 Plist Editor for Cover.app
Introduced a real Property List Editor.
Fixed Theme manager engine.
Other minor fixes
2020-04-07 13:48:12 +02:00

25 lines
553 B
Swift

//
// RunAtLogin.swift
// HWMonitorSMC
//
// Created by vector sigma on 18/03/18.
// Copyright © 2018 HWSensor. All rights reserved.
//
import Cocoa
import ServiceManagement
extension AppDelegate {
func setLaunchAtStartup() {
let success : Bool = SMLoginItemSetEnabled(gHelperID, true)
UDs.set(success, forKey: kRunAtLogin)
UDs.synchronize()
}
func removeLaunchAtStartup() {
let success : Bool = SMLoginItemSetEnabled(gHelperID, false)
UDs.set(success ? false : true, forKey: kRunAtLogin)
UDs.synchronize()
}
}