• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa daemon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa daemon


  • Subject: Re: Cocoa daemon
  • From: Christopher Corbell <email@hidden>
  • Date: Wed, 12 Nov 2003 21:38:16 -0800

On Nov 12, 2003, at 8:27 PM, Phillip Hutchings wrote:

On 13/11/2003, at 1:17 PM, Kris Kopicki wrote:

Hi,

I've written a simple Cocoa app that basically listens for NSWorkspaceWillLaunchApplicationNotification's. Is there anyway to make such an application a daemon? NSWorkspace seems dependent on NSApplication, and to my knowledge the only way to do a cocoa daemon is using daemon() and NSRunLoop. I'm sure it can probably be done using carbon, but I'm trying to avoid carbon as I'm not all that familiar with it.

Cheers,

Kris

You could set the NSUIElement flag in the apps info.plist, this will prevent the dock from showing the icon.

Just add this at the end of the file:
<key>NSUIElement</key>
<string>1</string>


--
Phillip Hutchings
[....]

I have a couple of follow-up questions:

1) Is it possible for an app to change state in this regard?
E.g. could a regular Cocoa app with icon in the dock be switched
into daemon mode, so that its main process keeps running but its
UI and dock icon go away?

2) If the app is created as a daemon but contains AppKit,
can it still (say, responding to an AppleEvent) come to the
foreground, put up a menu bar & UI, etc?

Thanks for any testimonials, this behavior is really intriguing...

- Christopher
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Cocoa daemon
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Cocoa daemon
      • From: Phillip Hutchings <email@hidden>
    • Re: Cocoa daemon
      • From: Wade Tregaskis <email@hidden>
References: 
 >Cocoa daemon (From: Kris Kopicki <email@hidden>)
 >Re: Cocoa daemon (From: Phillip Hutchings <email@hidden>)

  • Prev by Date: Re: Extending NSURLProtocol
  • Next by Date: Re: current mouse buttons state
  • Previous by thread: Re: Cocoa daemon
  • Next by thread: Re: Cocoa daemon
  • Index(es):
    • Date
    • Thread