Applications must use their information property list to advertise the services they provide. You need to add the NSServices
property, and it must have one dictionary entry for each service you provide. Each dictionary entry must have these keys: NSMessage
, NSPortName
, and NSMenuItem
. Each entry must have one or both of NSSendTypes
and NSReturnTypes.
Each entry can optionally have these keys: NSKeyEquivalent
, NSUserData
, and NSTimeout
. See “Services Properties” for a description of each key and examples of the NSServices
property in an information property list.
To add services properties to the information property list for a service application or a standalone service do the following:
Open your services application or standalone services project in Xcode.
Click the Targets tab, then click the appropriate target in the Targets list.
Click the Application Settings tab, then click Expert.
Click the New Sibling button.
Type NSServices
in the Property List column.
Choose Array from the Class pop-up menu.
Click the disclosure triangle next to NSServices
, then click the New Child button.
When you click the disclosure triangle, the New Sibling button changes to New Child.
Set the array element’s class to Dictionary.
Click the disclosure triangle next to the array element, then click the New Child button.
Type an NSServices
keyword in the Property List column, make sure its class is set appropriately, then type or choose a value.
Click New Sibling to add the other required keywords to this array element.
See “Services Properties” for a discussion of keywords and their classes.
You need to add an array element to the NSServices
property for each service your application provides. To add another array element, click NSServices
, click the New Child button, then follow steps 8 through 10.
© 2003, 2002 Apple Computer, Inc. All Rights Reserved. (Last updated: 2002-11-12)