mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
fixed start on boot
This commit is contained in:
@@ -343,6 +343,9 @@
|
||||
9A1410F4229E721100D29793 = {
|
||||
CreatedOnToolsVersion = 10.2.1;
|
||||
SystemCapabilities = {
|
||||
com.apple.ApplicationGroups.Mac = {
|
||||
enabled = 0;
|
||||
};
|
||||
com.apple.Sandbox = {
|
||||
enabled = 1;
|
||||
};
|
||||
@@ -350,6 +353,11 @@
|
||||
};
|
||||
9AFA401D22AE49A100FE90BC = {
|
||||
CreatedOnToolsVersion = 10.2.1;
|
||||
SystemCapabilities = {
|
||||
com.apple.ApplicationGroups.Mac = {
|
||||
enabled = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -35,9 +35,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
let runningApps = NSWorkspace.shared.runningApplications
|
||||
let isRunning = !runningApps.filter { $0.bundleIdentifier == launcherAppId }.isEmpty
|
||||
|
||||
if defaults.object(forKey: "runAtLogin") != nil {
|
||||
SMLoginItemSetEnabled(launcherAppId as CFString, defaults.bool(forKey: "runAtLogin"))
|
||||
} else {
|
||||
if defaults.object(forKey: "runAtLogin") == nil {
|
||||
SMLoginItemSetEnabled(launcherAppId as CFString, true)
|
||||
self.defaults.set(true, forKey: "runAtLogin")
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class MenuBar {
|
||||
|
||||
switch sender.title {
|
||||
case "Start at login":
|
||||
SMLoginItemSetEnabled(launcherId as CFString, !status)
|
||||
SMLoginItemSetEnabled(launcherId as CFString, status)
|
||||
self.defaults.set(status, forKey: "runAtLogin")
|
||||
case "Check for updates on start":
|
||||
self.defaults.set(status, forKey: "checkUpdatesOnLogin")
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array/>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array/>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user