The iPhone port of SyncEvolution has been publicly available for a week now. Since then Fabrizio has mentioned it in his blog posting about the Apple SDK and announced his Funambol GUI for SyncEvolution on the iPhone. Users have started asking questions about it. Before examining the possible next steps with this exciting new platform for SyncEvolution (after the Evolution on Linux and Nokia 770/800 Address Book versions), let’s take a step back and review how the iPhone port saw the light of day.
At the beginning god created the iPhone… or so some believe when Steve Jobs announce it. I’m not a follower of that particular religion and usually react allergic to hypes, but when Fabrizio offered to send me an iPhone in return for the promise to port SyncEvolution I couldn’t resist. The goal was to have a solid implementation of address book synchronization. With all my contacts maintained in Evolution on Linux, iTunes isn’t much help in that regard.
After experimenting with directly accessing the contacts in the SQLite database that approach was dropped in favor of using the Addressbook framework:
- the internal database schema is sufficiently complex that reimplementing read/write routines would have been a lot of work and likely led to compatibility issues with the iPhone address book
- changes to the SQLite database were not detected by the iPhone address book or caused it to crash
- using the Address Book API would allow to compile the same source also for Mac OS X synchronization, a nice extra because there doesn’t seem to be a SyncML client for Mac OS X
After all, iPhone runs parts of Mac OS X and that API is documented, so how different can it be on the iPhone? Unfortunately the answer turned out to be: quite a lot. From analyzing the libraries on the iPhone it was clear that all of the functions had been renamed. Using them in a way that works on Mac OS X just crashed on the iPhone. Due to the lack of documentation a lot of guessing and trial-and-error was required to figure out all the changes and avoid bugs that still seem to be lurking in normally unused parts of the iPhone libraries.
Besides figuring out how to access contacts on the iPhone the complete conversion to and from a standard format (vCard 2.1) had to be written. On Mac OS X there are library functions for that, but a) they use vCard in a way which is unlikely to be supported well enough by SyncML server and b) these functions are missing on the iPhone. With full control over the conversion process it was possible to minimize data loss to a minimum; see the compatibility entry for the platform for details.
For software on the iPhone a single-click installation is almost a requirement. Once I started with setting up the necessary repository I felt bad about not offering the same convenience to existing users, so I also added an apt repository for Debian/Ubuntu and an .install file for the Nokia Internet tablets.
Fabrizio tested all of these early versions on his own iPhone and provided valuable feedback. When it became obvious that the command line version worked, he was eager to also offer a GUI for it to the less technically inclined users. This time I managed to resist – I was a bit more diplomatic than “I’ve got better things to do” though But there is some truth to it: for the final 0.7 release the other platforms still need a bit of love and care. It also would be nice to not spend all evenings in front of the computer, even if just for a while.
Luckily that was enough motivation for Fabrizio to do the GUI himself. Now we just need to figure out a way how users can install both easily while at the same time being able to upgrade GUI and SyncEvolution independently: currently the Funambol GUI package contains a full copy of the SyncEvolution files. Therefore installing or updating the GUI after a SyncEvolution update will fall back to an older version of it unless the packages are always in sync. Hmm.
I have dodged an obvious question which came up right after the release: what about calendars? More on that in the next post.