Sunday, October 28, 2007

Introducing the Funambol iPhone plug-in

The day I bought my iPhone, I was totally surprised to find that the only way to synchronize address book and calendar was over iTunes. I could do that ten years ago with my Palm III via HotSync...

The iPhone is a networked device, I could not believe they missed the over the air synchronization element. After all, it is what made BlackBerry what it is today (and RIM a 60B+ company, with a market value
bigger than Motorola...).

Since that day, I have been thinking about porting the Funambol plug-in to the iPhone. We have it for Windows Mobile, Outlook, JavaME... Based on the Java or the C++ API. The goal was to have a native SyncML client, which would synchronize myFUNAMBOL (or any other SyncML server) with the local address book on the iPhone.

Once the hackers opened the door to actually make it happen, I called Patrick Ohly, the guy who wrote SyncEvolution and ported our SDK to Linux and Maemo. It just needed an iPhone to get going, so I shipped one from the US. A few weeks later, he had a first prototype. Then he went on vacation, rightly so ;-)

A couple of weeks ago, he sent me the first pre-release of SyncEvolution 0.7, with the iPhone address book sync. Awesome. He made it, through undocumented API (and he built a plug-in for Mac OS X while doing it ;-)

The stuff is great, but it requires a terminal and ssh to make it work. Manually... I asked him if he could do the GUI for the rest of us, he said "no thanks, I have better things to do in life" :-)

So I decided to build the GUI myself, as I did with the Funambol web interface for the iPhone address book. Quite an experience, navigating through Objective-C and undocumented Cocoa interfaces... A few nights and two weekends, and here it is.


There is a settings panel, to add your configuration parameters and sync to myFUNAMBOL.


To get it on your iPhone, you need Installer.app. Point your Safari browser on the iPhone to the http://www.funambol.com/iphone URL and install the Funambol Source, then open Installer (if you have an iPhone 1.1.1, you should open Installer, click on Sources (bottom right), click on Edit (top right), click on Add and put http://www.funambol.com/iphone then click on Done (top right) and refresh), select Productivity and install Funambol. That's it, it includes SyncEvolution as well (but you need the BSD subsystem to be installed on the iPhone already): change the settings and you have over-the-air address book sync...

I have to say the undocumented UIKit is extremely powerful. If you know Cocoa, you will find yourself at ease. The issue is that you have to try everything, because you have no clue what would work or not (the beauty of "undocumented" :-) The end result is a language that is elegant and allows you to build a GUI in hours (vs. weeks), with threads, timers and animations. Wow.

The issue is that I would bet Apple will not give developers this same API in February. They will take stuff out and will probably make it very difficult for anyone to really build powerful apps. Or maybe not. We'll see.

For now, enjoy the first native address book synchronization for the iPhone. And let me know if you find bugs in the GUI or you have suggestions.