Mac OS X: start on launch while in app store?

Viewed 3342

I need to start my app at system launch, but the problem is: it is already in App Store, so I must follow some rules like using sandboxing. This leads to fail of desired functions like LSSharedFileListInsertItemURL and SMLoginItemSetEnabled. How should I act in this case?

4 Answers

The setup for getting your sandboxed app to launch at login is time-consuming and it's too easy to get a step wrong. That's why I made a Swift package to automate it. With my LaunchAtLogin package, all you have to do is add a build step in Xcode and then write two lines of code:

import LaunchAtLogin

LaunchAtLogin.isEnabled = true
Related