Relaunch agent if updated (#86)

This commit is contained in:
Max Goedjen
2020-04-04 15:16:31 -07:00
committed by GitHub
parent 30148ee3a4
commit 8bbf489146
5 changed files with 72 additions and 2 deletions

View File

@@ -1,6 +1,5 @@
import Foundation
import SwiftUI
import ServiceManagement
struct SetupView: View {
@@ -117,7 +116,7 @@ struct SetupStepCommandView: View {
extension SetupView {
func installLaunchAgent() -> Bool {
SMLoginItemSetEnabled("com.maxgoedjen.Secretive.SecretAgent" as CFString, true)
LaunchAgentController().install()
}
func markAsDone() -> Bool {