3 ms·
Can I ask you a question regarding the "auto starts on login" feature? I have been working on that feature on an app I have but my app simply doesn't want to st
by busymom0 7y ago
Can I ask you a question regarding the "auto starts on login" feature? I have been working on that feature on an app I have but my app simply doesn't want to start on login. I don't even know how to troubleshoot it as nothing gets logged to the system.log using the console app. I used this tutorial but not sure why it won't work:
https://theswiftdev.com/how-to-launch-a-macos-app-at-login/ https://theswiftdev.com/how-to-launch-a-macos-app-at-login/
Did you face any issues too? Any thing I can use to troubleshoot?
- rampatra 7y agoI used this tutorial and it worked for me https://medium.com/@hoishing/adding-login-items-for-macos-7d76458f6495 https://medium.com/@hoishing/adding-login-items-for-macos-7d... but I had to do a small change which I have commented on this article. Or you can simply use this https://github.com/sindresorhus/LaunchAtLogin https://github.com/sindresorhus/LaunchAtLogin
- saagarjha 7y agoAre you registering your login item helper application with Launch Services?
- busymom0 7y agoCould you please elaborate on that? How would I do that? Right now I am using `SMLoginItemSetEnabled` to set my helper app and returns `true` as the returned status. The helper even seems to launch my main app just fine if I run the helper alone. But it doesn't work after login :( I did try running `lsregister -dump` but it returns a massive database and I have no idea how to even filter it for my app only.
- saagarjha 7y agoCan you try lsregister -f on your app and its helper and see if that helps?