Browse Source

Fix navigation to Login Items extension.

master
Abhishek Banthia 1 year ago
parent
commit
789a9e91ae
  1. 7
      Clocker/StartupKit/Sources/StartupKit/StartupManager.swift

7
Clocker/StartupKit/Sources/StartupKit/StartupManager.swift

@ -22,8 +22,11 @@ public struct StartupManager {
let response = alert.runModal()
if response.rawValue == 1000 {
OperationQueue.main.addOperation {
let prefPane = "/System/Library/PreferencePanes/Accounts.prefPane"
NSWorkspace.shared.openFile(prefPane)
// Reference: https://gist.github.com/rmcdongit/f66ff91e0dad78d4d6346a75ded4b751?permalink_comment_id=4286386#gistcomment-4286386
let prefPane = "x-apple.systempreferences:com.apple.LoginItems-Settings.extension"
if let prefPaneURL = URL(string: prefPane) {
NSWorkspace.shared.open(prefPaneURL)
}
}
}
}

Loading…
Cancel
Save