Setting up an Aperture Plugin is pretty easy. As I have written about in the past, you can, in about 10 minutes or so, have a plugin built and installed and running in Aperture. The plugin wont do much, but it will at least export images.
This is not to say however, that all you need to do is click “Build.” There is a little more to it than that, but not much.
Setting things up.
If you have not done so yet, the first step is to get a copy of the SDK. The SDK can be downloaded here, but you will need an Apple Developer Connection account. You can easily sign up for a free account and by doing so you will have access to the SDK download.
The SDK includes a Read Me.pdf file, which I highly recommend you open. It’s only one page, but it offers some important instructions on how to add the Aperture SDK documentation to Xcode. Here is the text:
To integrate the HTML reference information into Xcode, open the Xcode Documentation window and drag the index.html file from the Aperture API Reference folder into the Bookmarks section of the window.
Just drag the Aperture API Reference folder found inside the Documentation folder to your Documentation folder in your Developer folder, or wherever you would like on your hard drive and then follow the steps above. I owuld also recomend renaming the bookmark so that it says something more useful than index.html! You can also drag the Headers files into your Developer->Headers directory on your hard drive. These headers will be necessary if you ever decide to create an Aperture plugin without using the template.
Following these instructions will make finding important information about the SDK much easier down the road. The Documentation folder also contains a nice PDF overview file. This 12 page document outlines the basics. There is a quick overview of how the Aperture Plugin architecture is set up, and a synopsis of the three protocols contained in the SDK. I will go more into depth on these three protocols later.
Once you have installed the SDK by clicking the ApertureSDK install package you are pretty much ready to get started.
Creating The Xcode Project
After installing the SDK, reading through and integrating the documentation with Xcode, you are ready to begin setting up your project. To do so, simply open Xcode and click File->New Project or Shift-Command-N. This will bring up a New Project Assistant. Scroll down to the section for Standard Apple Plug-ins and select Aperture Export Plugin from the list. You will be asked to give your project a title and select a destination folder for your project.

Once you click Finish, Xcode will generate the files needed for your plugin and add in all the necessary Headers and Frameworks. Lets have a look at what Xcode included.

Your project is built with a small handful of files. Here is what you will see from the top down:
- ApertureExportManager.h - This is the specification for the ApertureExportManager protocol used by the plugin to communicate with Aperture during the export process
- ApertureExportPlugin.h - This is the specification for the ApertureExportPlugin protocol. This protocol contains methods for controlling the appearance and UI of the export window, controlling the export process, and providing progress information
- AppKit.framework - The standard Application Kit framework required by all Cocoa apps
- Cocoa.framework - The overlying Cocoa Framework required by all Cocoa apps
- CoreData.framework - The CoreData Framework used by Cocoa apps to implement things like undo, redo, and much much more
- Foundation.framework - The standard Foundation Framework required by all Cocoa apps
- Info.plist - A plist file specific to your plugin. From the Overview.pdf:
This Info.plist file encodes key-value pairs that are specific to the ProPlug plug-in architecture. They tell the plug-in manager what protocols and versions the plug-in implements and what host protocols and versions it supports. As well, the key-value pairs specify appropriate names, IDs, and groupings.
- InfoPlist.strings (English) - Localized versions of the Info.plist file
- Localizable.string (English) - Other localizable strings
- PluginManager.framework - Contains the specifications for ProPlug and PROAPIAccessing, the later of which acts as a broker between the plugin and Aperture
- Sample_Project.ApertureExport - Your plugin will be packaged as a CFBundle
- Sample_Project.h - The header specification file for your plugin
- Sample_Project.m - The implementation file for your plugin. This is where most of your code will be written
- Sample_Project.nib (English) - The Interface Builder NIB file for your plugin’s UI
- Sample_Project_Prefix.pch - The prefix header for your entire project
Well that is about it for today. Next time we will edit the Info.plist file, and begin creating our user interface. So far I have been using a dummy project titled Sample Project. I will continue to make reference to this project until we begin discussing what I have actually done with the Email plugin.
- Developing an Aperture Plugin - Part 1
- Developing an Aperture Plugin - Part 2
- Developing an Aperture Plugin - Part 3
- Developing an Aperture Plugin - Part 4
This entry was posted on Tuesday, April 17th, 2007 at 8:34 am and is filed under Email, Email Pro, Plugins, Projects. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

