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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to