/ASLauncherMac

Launch at Login for Your Mac App

Primary LanguageShellMIT LicenseMIT

Easy to Add

Launch at Login

for Your Mac App


Require

  • Swift 4.0

Install

  • Cocoapods
Podfile
pod "ASLauncherMac"
  • Carthage
Cartfile
github "antscript/ASLauncherMac"
update
$ carthage update

Usage

Step 1: Add a Launcher Target

add target

add a target with Application / Cocoa

bundle id

add "-Launcher" for Launcher Target Bundle ID

Step 2: Setup Launcher Target

backgroud only

add background only for YES

skip intall

set skip install to YES

Setup 3: Setup Main Target

add copy files

add copy files

add copy files

Step 4: Setup Framework

add framework

drag ASLauncherMac.framework into project

embed framework

embed framework

embed framework for both of 2 target

Step 5: Coding

// debug options
// return result with notification

ASLauncherMac.debug = true // default is false
// in main app , you can

ASLauncherMac.enableLaunchAtLogin()

// or

ASLauncherMac.disableLaunchAtLogin()

// launch main app from launcher :
// add to Launcher -> AppDelegate -> applicationDidFinishLaunching

func applicationDidFinishLaunching(_ aNotification: Notification) {
ASLauncherMac.debug = true
ASLauncherMac.launch(bundleID: "your-main-app-bundle-id", AppName: "your-app-display-name")
}

============= LICENSE

MIT