The Pug Automatic

Updating plugins for Adium 1.3

Written August 28, 2008. Tagged OS X, Cocoa, Adium.

I just got my File Transfer Sender Subdirectories plugin working with Adium 1.3.

I also moved the source to git/GitHub.

A mail sent out to all adiumxtras.com plug-in authors gave some pointers on moving to Adium 1.3:

All plugins must be recompiled for Adium 1.3, since adium was changed from instance variable to global constant.

You must also add a minimum Adium version to the Info.plist file, e.g.

<key>AIMinimumAdiumVersionRequirement</key>
<string>1.3</string>

I did these things, but my plugin would not build. I needed to include two more headers – many thanks to Catfish_Man in #adium-devl for helping me out.

AIUtilities/AITigerCompatibility.h

My plugin was originally configured to compile for OS X 10.4 Tiger. This is a good idea, since Adium 1.3 itself is still compatible with Tiger.

But I got these errors trying to build the plugin:

error: syntax error before 'NSUInteger'

referencing the code

/*!
* @brief Get the visbile object at a given index
*/

- (AIListObject *)visibleObjectAtIndex:(NSUInteger)index;

and

fatal error: method definition not in @implementation context

referencing

- (void)listObject:(AIListObject *)listObject didSetOrderIndex:(float)inOrderIndex;

To fix that, I had to include another header in my plugin's main .h file:

#import <AIUtilities/AITigerCompatibility.h>

Adium/AISharedAdium.h

When that was done, or if I built for OS X 10.5 Leopard only, I instead got a couple of

error: ‘adium’ undeclared (first use in this function)

from lines trying to use that constant.

That required another header:

#import <Adium/AISharedAdium.h>

Hope this helps someone.