How to do launch at login for macOS apps
Issue #757
- Use SMLoginItemSetEnabled from Service Management framework
- Use a helper background app that checks and invokes our main application
- Copy our helper app into
Library/LoginItems
1 | helper_dir="$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Library/LoginItems" |
1 | final class AppDelegate: NSObject, NSApplicationDelegate { |