Search code examples
cocoawrapperbundlelauncher

Create simple cocoa application wrapper


I have an application I want to bundle (with some additional files) together inside a wrapper application.

Literally the only thing I want to do is have the wrapper application launch a resource file (i.e. as if I'd typed:

/path/to/Resources/Bundled.app/Contents/MacOS/executable

into the terminal.

Make sense? I thought this should be simple, but I caouldn't find a simple way to do this-- my cocoa programming is limited, to say the least.

Thanks in advance!


Solution

  • Your outer program can use NSBundle to locate the inner program within the outer program's bundle.

    To run the inner program: If it's an application, use Launch Services or NSWorkspace; if it's a command-line tool, use NSTask.