Today we are going to cover the Info.plist file. This is one of the first files you will need to edit in order to make your Aperture plugin work properly. Every Cocoa application contains an Info.plist file. This file, written in standard XML, is responsible for holding some basic information about the application, or in our case, the plugin.
Plist files are pretty easy to understand once you take a close look. Since they are written in XML they contain tags between brackets like these < >. Each tag is eventually followed up by a closing tag in the same way HTML is written.
Open up the Info.plist file by double clicking it in the Xcode file browser. You will see a listing of code in red and black. Usually, the code in red refers to a tag or other XML information, and the code in black is a value or description string. There is also code in green, which indicates a comment. To begin your own comments simply start a new line with <!-- followed by your comment text.


The first few lines of code are the Plist header tags. You really don’t need to worry about these. Just take note that they identify the file as an Apple Plist version 1.0 file written in XML.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
In a plist file sections are created using the <dict> tag. For our purposes it is important to understand that these <dict> tags are used to separate some of the major sections of information in our file. Inside each <dict> tag you will see a number of <key> and <string> pairs. Each <key> tag represents a field and each <string> tag represents its corresponding value. Fortunately there are only a handful of <key> and <string> pairs that we need to worry about.
Lets take a closer look. Below is the first <dict> tag that we run into. The second <key> <string> pair that we see, CFBundleExecutable, might need to be edited depending on the title of your project. The value for this field will need to be altered if you have chosen a project name with a space between two words. For example "Sample Project" will need to be changed to "Sample_Project" with an underscore between the two words. This little bug was pointed out by Bagelturf, so I have to give him credit here for figuring this one out.
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<!-- Added an underscore between the two words in the title.
<key>CFBundleExecutable</key>
<string>Sample_Project</string>
The next <key> <string> pair is CFBundleIdentifier. Here you should edit the part that says "yourcompany" to reflect the title of your own company, name, or website. Don’t add any spaces, and change the com to net or org depending on your sites address.
<!-- Changed this field to aperturepluggedin
<key>CFBundleIdentifier</key>
<string>com.aperturepluggedin.export.Sample_Project</string>
The rest of the <key> <string> pairs in this first <dict> grouping can remain unchanged. It would probably help to take a minute to read through each line just so you know what they are, but for our purposes, we can leave them alone.
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Sample Project</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>NSPrincipalClass</key>
<string>Sample_Project</string>
<key>ProPlugDictionaryVersion</key>
<string>1.0</string>
<key>ProPlugDynamicRegistration</key>
<false/>
<key>ProPlugPlugInGroupList</key>
<array>
<dict>
This next section will also remain unchanged. This part, which identifies your plugin as an Aperture Export plugin, contains a UUID number, which is already set for you. Don’t change this code. The developers at Apple have made comments in the places where you should leave code alone and where you should make changes. Be sure to follow their instructions.
<!– Do not change the groupName or uuid. These will help identify your plug-in as an Aperture Export plug-in. –>
<key>groupName</key>
<string>Export</string>
<key>uuid</key>
<string>616BA321-B4C2-49DF-8FD8-2E3392D2D240</string>
</dict>
</array>
<key>ProPlugPlugInList</key>
<array>
<dict>
In this third <dict> section there are a few items to edit. The first <key> <string> pair you might want to change is the displayName. The displayName field will determine what the user will see in the list of plugins when they click Export in Aperture. This name will also be displayed on the plugins title bar. The Aperture Export plugin template has already made an entry for you based on the name of your project. However, if you wish to change its name, you can do so. Notice here that they have automatically added the underscore. If you wish, you can remove it here as I have done.
<key>className</key>
<string>Sample_Project</string><!– Removed the underscore for cosmetic reasons
<key>displayName</key>
<string>Sample Project</string><!– Do not change this uuid. It should match the group uuid above and will help Aperture identify your plug-in as an Export plug-in. –>
<key>group</key>
<string>616BA321-B4C2-49DF-8FD8-2E3392D2D240</string>
Here you can optionally add a help page URL. In your plugin you will see a button labeled with a question mark. This is the URL you will be taken to if you click the help button. I have changed this to my main website for now, as I don’t have a help file for this Sample Project. Later we can come back and edit it to reflect a real help page on our website.
<!– You should change the help URL to a URL appropriate for your plug-in. If you do not wish to include a help URL, please remove the helpURL tag and its string tag. –>
<key>helpURL</key>
<string>http://www.aperturepluggedin.com/</string><key>protocolNames</key>
<array>
<string>ApertureExportPlugIn</string>
</array>
This next <key> <string> pair is the last one we need to edit. But first we will need to generate a UUID. To do this simply open Terminal and type uuidgen at the prompt. You will be given a UUID number, which you can then copy and paste into the placeholder as shown below.

This is the only UUID number you will need to edit. Leave all other UUID numbers alone as they are used by Aperture and OS X to identify your plugin.
<key>uuid</key>
<!– You must replace the text below with a UUID. Use the uuidgen command line utility to generate a new one and then paste it into the tag below. –>
<string>292168B6-9956-4C85-8A8E-2484DBB96DA6</string>
</dict>
</array>
<key>ProPlugProtocolList</key>
<array>
<dict>
<key>protocolName</key>
<string>ApertureExportManager</string>
<key>versions</key>
<array>
<integer>1</integer>
</array>
</dict>
</array>
</dict>
</plist>
That’s about it for the Info.plist file. Remember to go back and change your help URL once you have created the real page. You can also remove the <key> <string> pair for the help URL entirely if you do not wish to offer any help!
Plist files can also be edited using the Property List Editor as shown below. This can be helpful if you have an extensive Plist file as the program automatically organizes the XML based on the <dict> tags. To open your Plist file with the Property List Editor just right click the file in Xcode and click Open With Finder.

Next time we will be discussing the placeholders found in our implementation file. Once we have filled in the handful of placeholders we will be ready to build our plugin and try it out in Aperture!
- 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 Friday, May 4th, 2007 at 12:46 pm 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.

