Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: launchd and Cocoa apps?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launchd and Cocoa apps?



Devraj Mukherjee wrote on Monday, July 31, 2006:
>I want to write a Cocoa application that runs as an application.

Most do. Or did you mean to say "daemon?"

>Is it
>possible to use launchd with Cocoa applications or what other ways can
>I make a Cocoa application a daemon?

If you're talking about a regular Cocoa application based on AppKit with a user interface, then the answer is "no." You can't run an application with a user interface as a system daemon.

If you're just talking about an Objective-C application, then the answer is "yes." You can easily create an Objective-C tool that can use much of the Cocoa frameworks (collections, NSConnection, ...) that has no UI and runs happy as a daemon. This is called the Foundation framework and is a subset of the Cocoa framework that you would normally use when creating a GUI application.

There is also something called a "UIElement" application. The app uses AppKit, can present windows and what not, but runs in "stealth mode": It doesn't present an icon in the dock, and it doesn't have a menubar. It's for applications that add some UI goodies, but doesn't appear as an regular application from the user's perspective. These are normally started as Login items, not launchd.

--
James Bucanek
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >launchd and Cocoa apps? (From: "Devraj Mukherjee" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.