Open gelstudios opened 3 years ago
Good catch. I think it's because the Downloads folder is protected these days so the launcher can't access it.
The API to add your app to System Preferences > Login Items has been deprecated for years now. I was also disappointed when I found out about this. The officially sanctioned way of creating a helper application seems obtuse and not transparent to the user and I never really liked it, but I decided to do it the officially supported way anyway.
I think you're right about the protected Downloads folder, it works fine if the app is in ~/
Not really sure how to solve this actually, maybe I should just start distributing the app as one of those fancy DMGs where you can drag it into the Applications folder.
I've seen a number of apps detect when they are running from a path other than /Applications
or ~/Applications
and offer to move themselves into the main Applications folder.
examples: https://discussions.apple.com/thread/8133756 https://support.swiftify.com/hc/en-us/articles/360013074499-Getting-up-and-started-with-the-Offline-Converter-
possible libraries: https://github.com/potionfactory/LetsMove https://github.com/OskarGroth/AppMover
I ran the app (which works great btw!) from the
~/Downloads
directory since safari extracted the zip by default, and later noticed some log spam repeating every few seconds:I disabled "Launch At Login" on a hunch, and the log messages stopped.
Re-enabled "Launch At Login" and moved the App to
/Applications
and the log messages did not reappear.I did notice the App does not appear in System Preferences > Login Items, but also dont know if that has fallen out of style with macos apps 🤓
For reference, another app i use (mos) has a "launch at login" option inside it, and appears in syspref Login Items. ex: https://github.com/Caldis/Mos/blob/master/Mos/Utils/LaunchStarter.swift