Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Building an Edit Plug-in

The easiest way to build a new Edit plug-in is to create a new project in Xcode using the Aperture Edit Plug-In project template, or to duplicate one of the sample projects. (Both the template and the sample projects are included in the SDK install.) Be sure to customize the class names and to fill in the proper UUIDs to avoid namespace collisions.

In this section:

Example Edit Plug-ins
The Info.plist for an Edit Plug-in


Example Edit Plug-ins

Two example Edit plug-ins are installed in /Developer/Examples/Aperture. These examples illustrate API usage as well as several more advanced concepts.

The Info.plist for an Edit Plug-in

An Aperture Edit plug-in is packaged in a CFBundle. Each bundle contains one more plug-ins. A bundle also contains an Info.plist file. This file encodes ckey-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. This file also optionally provides several keys that are specific to Aperture Edit plug-ins.

Here is a commented Info.plist template for an Aperture Edit plug-in.

Listing 1-2  An Edit Plug-in Info.plist

<key>ProPlugDictionaryVersion</key>
<string>1.0</string>
<!--Required. Identifies the version of the ProPlug dictionary this plug-in uses. The value should be 1.0 for this version of the Aperture SDK.-->
 
<key>ProPlugDynamicRegistration</key>
<false/>
<!--Required. Tells the plug-in manager whether the plug-in principal class performs plug-in registration tasks. If true, the class must implement the PROPluginRegisterBundle protocol.-->
 
<key>ProPlugInGroupList</key>
<!--Required, along with all child keys. Identifies this plug-in as an Edit plug-in.-->
<array>
  <dict>
    <key>groupName</key>
    <string>Edit</string>
    <key>uuid</key>
    <string>616BA321-B4C2-49DF-8FD8-2E3392D2D240</string>
  </dict>
</array>
 
<key>ProPlugPlugInList</key>
<!--Required. Identifies the plug-in's in this bundle.-->
<array>
  <dict>
  <key>className</key>
  <string>xxxxxxxxxxx</string>
  <!--Required. The name of the class that implements the plug-in protocol.-->
 
  <key>displayName</key>
  <string>xxxxxxxxxxx</string>
  <!--Required. The name that will appear in menus and on the Edit window.-->
 
  <key>protocolNames</key>
  <array>
  <string>ApertureEditPlugIn</string>
  </array>
  <!--Required. Specifies the plug-in protocol this plug-in implements.This
  value should be ApertureEditPlugIn for this version of the Aperture SDK.-->
 
  <key>infoString</key>
  <string>Description of your plug-in and what it does</string>
  <!-- Optional. This is the descriptive text that displays in the Aperture
  Command Customization window.-->
 
  <key>uuid</key>
  <string>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx</string>
  <!--Required. Specifies a unique identifier for this plug-in. Use the uuidgen
  command-line tool to generate a unique identifier.-->
 
  <key>version</key>
  <string>1</string>
  </dict>
 
  <key>supportedRAWExtensions</key>
  <array>
    <string>cr2</string>
  </array>
  <!-- Optional. If your plug-in reads the RAW master data from images
  but only supports certain raw formats, providing a list of file name extensions
  here will disable your plug-in if the user has selected any images that
  aren't RAW or are RAW but do not have one of the extensions listed here.
  Note that Aperture will still pass images that do not have any extension at
  all to your plug-in, regardless of the extensions listed here. -->
 
  <key>supportedEditableExtensions</key>
  <array>
    <string>tiff</string>
  </array>
  <!-- If your plug-in only knows how to read or write certain types of files,
  it can request that Aperture write new editable files in those formats.
  However, images may already be editable when the user selects them, meaning
  Aperture will not write a new file for your plug-in. Providing a list
  of supported editable file name extensions here tells Aperture to
  disable your plug-in if the user has selected images that are already editable,
  but whose master file does not have one of the listed extensions. -->
</array>
 
<key>ProPlugProtocolList</key>
<!--Required, along with all child keys. Specifies the host protocols that this plug-in supports.-->
<array>
  <dict>
    <key>protocolName</key>
    <string>ApertureEditManager</string>
    <key>versions</key>
    <array>
      <integer>1</integer>
    </array>
  </dict>
</array>


< Previous PageNext Page > Hide TOC


Last updated: 2008-04-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice