sindresorhus / LaunchAtLogin-Legacy

Add “Launch at Login” functionality to your macOS app in seconds
MIT License
1.55k stars 122 forks source link

Is there some way to enable it by default for Mac apps outside the AppStore? #90

Closed alvarokrn closed 1 year ago

alvarokrn commented 1 year ago

Just that, I wonder if there exists some way to enable it by default for Mac apps outside the AppStore?

sindresorhus commented 1 year ago

There is no technical limitation, even for the App Store. It's just that Apple will reject the app if you do. So outside the App Store, you can do it if you want, but it may annoy users.

alvarokrn commented 1 year ago

I mean, if I have this in my code:

LaunchAtLogin.Toggle {
   Text("Launch at login")
}

Is there some way to set programatically the default value as true?

sindresorhus commented 1 year ago

Set LaunchAtLogin.isEnabled = true at launch.

alvarokrn commented 1 year ago

Thanks!