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