As the title tells,plea开发者_如何转开发se help...
You need to include the NSRequiredContext key in each of your services' dictionaries.
The documentation doesn't mention this, but it is required since Mac OS X 10.6; as you've seen, your service will be disabled by default if you don't have it.
You should also call the NSUpdateDynamicServices
function on launch, to refresh the user's Services menu without them having to log out and back in.
精彩评论