Releases: sindresorhus/LaunchAtLogin-Legacy
v5.0.2
- Consistently use macOS 10.13 as deployment target for 'modern' Xcode
v5.0.1
- More robust
ONLY_ACTIVE_ARCH
comparison
v5.0.0
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.
FAQ
What do I do later on when my app targets macOS 13
Remove the run script phase. It's no longer needed then.
You could also consider moving to my modern version of this package.
v4.2.0
- Silence SMCopyAllJobDictionaries deprecation warning b35bfbd
v4.1.0
v4.0.0
Breaking
- Requires Xcode 12 to build.
Improvements
- Swift Package Manager support! 060284a
This is now the recommended way to install LaunchAtLogin. Carthage support will be removed at some point in the future. - A SwiftUI component for toggling "launch at login" is now bundled. f7b255b
It could not be easier to add support for "launch at login" in your app. - We also added built-in conveniences for
@ObservedObject
, Combine, and Storyboards (KVO). f7b255b
Huge thanks to @SergeyKuryanov for implementing a lot of the things in this release.
v3.0.2
v3.0.1
- Don’t inherit entitlements from the main app in the helper app (#38)
The helper app only needs to be sandboxed. Previously, it incorrectly inherited the sandbox entitlements of the parent app.