Search code examples
macoscocoacontextmenufinderpopupmenu

Add an item in Finder's contextual menu with Cocoa



In Cocoa on Mac, I would like to add a menu item in the Finder's popup menu that comes when I right-click on a file or a folder, and having this item pointing to a function in my app.
How can I achieve this ?
Thanks !


Solution

  • A good place to start is CocoaDev: StandardService. It outlines what you are trying to accomplish and they give some source code to follow such as the MakingServices example.

    2015 Update: As of Yosemite, Apple includes an extension called Finder Sync which allows you to accomplish most of what a Service used to do.

    Best of luck.