• 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: Robert Vojta <email@hidden>
  • Date: Fri, 10 May 2013 09:19:30 +0200

On Friday, 10. May 2013 at 9:00, Stephen J. Butler wrote:
> Make launchd run the same executable, but with a "--daemon" option. That's
> got to be as easy, or easier, than detecting an already running one and
> forking + daemonizing.

Detecting is not so hard …

[NSRunningApplication runningApplicationsWithBundleIdentifier:@"GUI-APP-BUNDLE-ID"]

… and you can start app in this way …

[NSWorkspace launchApplicationAtURL:options:configuration:error:]

… but I wouldn't do this. Stick with launchd.

Oh, are going to release your app in Mac App Store for example? There're some limitations because of Sandbox.

BTW if you're command line guy,isn't this ...

 qlmanage -p $PHOTO_PATH1 $PHOTO_PATH2 …

… enough for you? Different shortcuts, but it does the same thing as your app (didn't look at it, based on your description).
_______________________________________________

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: Ondrej Holecek <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>)
 >Re: how to run NSApplicationMain() in child process? (From: "Stephen J. Butler" <email@hidden>)

  • Prev by Date: Re: how to run NSApplicationMain() in child process?
  • 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