views:

161

answers:

2

Hi all

I'd like to build a cocoa app and would like to have it opened on request. For better understanding you should look at evernote. It has helper app that sits in status bar and has it's own status item.

Evernote's application bundle shows EvernoteHelper executable. How would i go about creating such executable in XCode project? Should it be separate target? But doesn't separate target for an executable creates separate application bunlde?

I saw some examples on the internet for creating app helpers that help relaunch the app. But these helper apps have nothing more than compiled code. I'm curious about extra resources like nib files for helper apps that include menus and/or images.

UPDATE regarding the comment

I'd like the helper app to be sitting in systembar and when it's being clicked, my app should be launched (it wouldn't be running, the helper app would work as a launcher for the main app).

I'm curious how to copy helper executable to main app's bundle

A: 

It's just another application and it is totally up to you how you want to organize your files in Xcode, have it in a separate project or a sub project. That said I would usually just add a target. The new target could include NIBs - but does not have to. Really depends on what your helper is supposed to be doing. Not sure what you mean exactly with "relaunching". (Maybe launchd is just what you are looking for?)

tcurdt
+2  A: 

You need two applications: One, the actual application that the user will work with; the other, a faceless background application to provide the status item and launch the actual application.

You'll probably make the FBA a resource of the other application, and have preferences in the non-FBA controlling whether the FBA is running and whether it runs on login.

Peter Hosey