Re: How do I bend launchd to my will?
Kyle Sluder <[email protected]> Thu, 30 Jun 2011 15:34:10 -0700
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 30, 2011 at 3:30 PM, Gregory Weston <[email protected]> wrote: > In a new app I'm writing I want to provide the user with a checkbox to have the app launch at login. Traditionally, I'd add an entry to the login items list for this, but I'm under the impression that the modern, enlightened coder uses a well-formed plist in ~/Library/LaunchAgents. This seemed like a good idea, given that I'd like to pass it arguments when it's launched that way as well. If you're really talking about launching your app at login, you still want to use the Login Items list via the LSSharedFileList API. http://cocoatutorial.grapewave.com/tag/lssharedfilelist-h/ Login Agents are for background helper apps that need to connect to the window server (usually to communicate with other apps). Login Daemons are for background services that don't need to connect to the window server. --Kyle Sluder