• 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: how to run NSApplicationMain() in child process?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to run NSApplicationMain() in child process?


  • Subject: Re: how to run NSApplicationMain() in child process?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 10 May 2013 12:03:17 -0700

On May 9, 2013, at 11:56 PM, Ondrej Holecek <email@hidden> wrote:

> No, the "daemon" is the picture viewer itself. It is hidden most of
> the time.

That doesn’t sound like a daemon or an agent; those types of things run in the background with no UI. Once there’s a UI, you are writing a regular app. If you don’t want it to “feel” like a full app, with a Dock icon and menu bar, what you’re looking for is the “LSUIElement” key in the app’s Info.plist — this tells the OS that the app just wants to display windows and nothing else. (For example, this is how the Special Characters palette is implemented.)

> When you run "xqiv image1.jpg image2.jpg" from command-line,
> then the "daemon" pops and displays image1.jpg.

All you need is to make an app, maybe with the LSUIElement flag as I said above. Let’s say its bundle ID is com.example.XQIVApp. Then you can implement the ‘xqiv’ command-line tool as a trivial shellscript:

	#!/bin/sh
	open -b com.example.XQIVApp $@

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: how to run NSApplicationMain() in child process?
      • From: "Stephen J. Butler" <email@hidden>
References: 
 >how to run NSApplicationMain() in child process? (From: Ondrej Holecek <email@hidden>)
 >Re: how to run NSApplicationMain() in child process? (From: "Stephen J. Butler" <email@hidden>)
 >Re: how to run NSApplicationMain() in child process? (From: Ondrej Holecek <email@hidden>)

  • Prev by Date: Re: Setting Up a MVC most of it works BUT
  • Next by Date: Re: how to run NSApplicationMain() in child process?
  • Previous by thread: Re: how to run NSApplicationMain() in child process?
  • Next by thread: Re: how to run NSApplicationMain() in child process?
  • Index(es):
    • Date
    • Thread