views:

47

answers:

2

hi all

I'm trying to create an NSService in a Bundle project. I need to add a main and other bits of code to the actual cocoa bundle created for me by xcode.

Is this as simple as just adding an object-c class via the xcode wizard, then adding my main function to that? or is there some other magic way or other steps involved?.

Many thanks.

+1  A: 

You can add code by simply adding source files.
A bundle normally does not have a main function since it is loaded from another executable.

Nikolai Ruhe
thanks - do you also know how i change the bundles extension from .bundle to .service - i've tried the two options under Wrapper but neither seem to work.
A: 

thanks Nikolia - after adding the code, i also had to change the bundle type to Executable, which also allowed me to change the extension from .bundle to .service.

Now all I need to do is work out how to stop the service!