CocoaDev

Edit AllPages

A StandardService is one of those things you find under the Services submenu of the application menu in Cocoa applications.

A StandardService is basically AnApplication that runs in the background, and instead of ending with the .app extension, it ends with .service, and usually won’t have any interface to speak of.

The Info.plist needs to specify LSBackgroundOnly = 1, in order to assure the service does not appear in the dock.

Services are used to provide some functionality from your application throughout the system: Grab provides a StandardService for taking screenshots, and Mail has services for mailing to someone, and mailing the selected text.

When developing Services, be sure to remember that at the time of this writing (February 2002), few Carbon applications take advantage of services (an example of one the does is BBEdit).

Some more background info can be found here (It’s all still from the OpenStep days, but should pretty much apply to MacOSX, as well):

http://www.stepwise.com/Articles/Technical/Services.html


Unfortunately Apple seems not to be paying a lot of attention to Services and as a result they are not as polished as other features. You should be aware of some bugs and problems in their current implementation (and write to your Congressman to have them fixed)


See MakingServices and MakingAppServices for some sample code.