Add “Launch at Login” functionality to your macOS app in seconds
MIT License
Bot releases are hidden (Show)
ONLY_ACTIVE_ARCH
comparisonhttps://github.com/sindresorhus/LaunchAtLogin/compare/v5.0.0...v5.0.1
Please read carefully
macOS 13 introduced a new API to toggle “launch at login”. We now use this new API when your app is running on macOS 13 and later.
Upgrading to this version requires migration!
You need to call LaunchAtLogin.migrateIfNeeded()
at launch to migrate the enabled state to the new system. You do not need to guard this call. It can be called at every app launch. It will only ever run the migration once.
For example, for a SwiftUI app, you would call it like this:
import SwiftUI
import LaunchAtLogin
@main
struct MyApp: App {
init() {
LaunchAtLogin.migrateIfNeeded()
}
var body: some Scene {
WindowGroup {
// …
}
Settings {
Form {
LaunchAtLogin.Toggle()
}
}
}
}
You can remove this call when you think all users have ran the migration.
Make sure to verify that your app still launches at login on macOS 13.
If you need to rerun the migration for testing purposes, delete the LaunchAtLogin__hasMigrated
UserDefaults key.
Remove the run script phase. It's no longer needed then.
You could also consider moving to my modern version of this package.
https://github.com/sindresorhus/LaunchAtLogin/compare/v4.2.0...v5.0.0
https://github.com/sindresorhus/LaunchAtLogin/compare/v4.1.0...v4.2.0
ITSAppUsesNonExemptEncryption
to the helper app https://github.com/sindresorhus/LaunchAtLogin/commit/b068272af8420fc0a27ecfb7b54d900552359102
https://github.com/sindresorhus/LaunchAtLogin/compare/v4.0.0...v4.1.0
@ObservedObject
, Combine, and Storyboards (KVO). https://github.com/sindresorhus/LaunchAtLogin/commit/f7b255bc96965a178dc8f1073058a037b35d38fd
Huge thanks to @SergeyKuryanov for implementing a lot of the things in this release.
https://github.com/sindresorhus/LaunchAtLogin/compare/v3.0.0...v3.0.1
https://github.com/sindresorhus/LaunchAtLogin/compare/v2.5.0...v3.0.0