How to write a plug-in for an app (Mail)

Discussion in 'Mac Programming' started by DesertFox, Jul 27, 2007.

  1. DesertFox macrumors member

    Nov 25, 2004

    Im would like to write a plugin for the Mail application, but Im not really sure where to start or what programming languages to begin looking at. I would like the plug-in to have a menu item in Preferences and interact with other applications (in this case the Address Book). Since Im working with Ruby, I started looking at RubyCocoa as a possible candidate for the programming language, but not sure of this would be the best choice for this type of job. Could someone with more experience please point me in the right direction?
    How are most plug-ins coded these days? XCode and Objective-C?
    Any advice is much appreciated.
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    The Mail Plugin API is, at best, unofficial and is basically undocumented so you are up against it from the start. Mail is written in Cocoa so all the plugins I have seen for it are too.

    As your plugin runs in the process space of the host app I'm not convinced you can use RubyCocoa to write a plugin: I think you have to use Objective-C. Having said that there is a tutorial here showing how to write a plugin using the Python/Cocoa bridge so you might get the Ruby one working in a similar manner.

Share This Page