Thunderbird Sync With iPhone/iPod touch

I’ve gotten quite a few emails over the past several months from people who want to know how to sync their iPhone (or iPod touch) with Thunderbird. Quite a few are disappointed to find mozPod doesn’t support these newer devices. It’s not quite my fault as I’ve yet to see any indication that it’s practical to implement.

I should note I do not own either device, but from what I’ve read, it doesn’t matter. Hopefully by 2nd or 3rd generation when I’m on the market Apple will have come to their senses.

The problem is that Apple hasn’t provided a good method for anyone to provide sync with the iPod. Even on older devices it wasn’t pretty, but it was workable. There is no real sync API outside of iSync, which is Mac only and not a public API. Instead what was done is mount the iPod file system and send it your data. While not awesome, this has been workable and provided many Thunderbird users with mobile data.

On the iPhone and iPod touch it’s not even possible to easily mount the filesystem. The best method I’ve heard of is hacking it so you can mount your phone using sshfs with something like FUSE. I know myself and some Linux and Mac users (horray for MacFUSE!) could manage, but I wouldn’t dare try to explain to someone how to do that. From what I’ve read the iPhone manages data using SQLite 3. Therefore it seems possible to use mozStorage to interface with it. Perhaps someone with more experience with mozStorage and db’s generated outside mozStorage would know better about any potential compatibility issues.

Calendar:
/var/root/Library/Calendar/Calendar.sqlitedb

Address BookL
/var/root/Library/AddressBook/AddressBook.sqlitedb
/var/root/Library/AddressBook/AddressBookImages.sqlitedb

Seems to me Apple could turn this into an API pretty easily by re-creating the old iPod style USB storage device mounting and give us access to these files.

In my mind the ideal implementation would be for Apple to just have a iTunes embed a mini web server locally accessible (obviously) and create a REST api to work with all data on the device. That would open up a whole new way of interacting with the device. Essentially you would interact with 127.0.0.1:[port#] and GET/POST your way through the interface. Perfect for Calendar, Address Book, Notes, or whatever else Apple comes up with.

To get a vCard for someone:

  GET /contact/vcard/?last_name=Jones HTTP/1.1
  Host: localhost
  User-Agent: mozPod/0.3

vcard can also be done as xml (ooh DOM parsing for iPhone!), so there’s lots of possibilities.

To add a contact:

  POST /contact/add/ HTTP/1.1
  Host: localhost
  User-Agent: mozPod/0.3
  Content-Length: 450
  Content-Type: application/x-www-form-urlencoded

  fname=John&lname=Doe&address=1%20Large%20Road...

Though it would likely make sense to go with a more vcard like naming structure.

For calendar iCalendar or vCalendar would make most sense:

 GET /calendar/ical/?start=1-1-1970&end=1-19-2038 HTTP/1.1
  Host: localhost
  User-Agent: mozPod/0.3

You get the idea. Dead simple access. You could then use something likecurl to manipulate the iPhone’s address book via your existing application. It would be only accessible locally, so it’s as secure as your system. It would actually make things more secure since it would be one less reason for tinkering on the actual device, and it would open up a whole new market of iPod/iPhone software to go with all those accessories that have helped boost Apple’s market share. SyncML is cool, but SyncML is also a beast and reminds me of SOAP, WSDL etc.

Apple a Phone Service

Business Week’s Alex Salkever has an interesting article about Apple creating it’s own Skype like system. I’ve talked briefly about Skype before. I’m a huge fan. It’s a solid product. But Apple should take it to the next level. Allow me explain:

Ideally, for anything to become a good communication standard, it must be a standard. Skype is proprietary. While free, it’s not something that will be ported to a billion obscure systems anytime soon. There is also no guarantee it will stay free. We can only hope and trust. We need a standard. Something that can never be taken away. Apple, is an Open Source company these days. Look at how much open source is under the hood of Mac OS X. Clearly standards are a part of Apple’s future. Apple also has a history with communications (AppleTalk, iChat, Rendezvous). Apple has lots of experience with rich media (QuickTime), as well as streaming rich media. Apple is the perfect company for the task.

What’s needed?

An open platform for voice communications that meets the following requirements:

  • Secure
  • P2P
  • Needs to be a Standard
  • Needs to be built on standards (TCP/IP, etc. etc)
  • Nothing proprietary in the protocol
  • Someone with an eye for how to do things “right”
  • Directory Mechanism
  • Method to prevent abuse (spam)

Now if Apple created some protocol with a few partners (Motorola, of a PPC relationship also has a stake in communications) create a standard, it’s got a good shot at taking off. A great place to integrate Rendezvous. Or a similar technology perhaps based upon it.

Advantages for Apple

  1. A vast new communications feature for Mac OS X/iChat. This could serve as the core, as they add features for their release. Able to use what’s contributed by other companies/individuals.
  2. Gain a reputation of not just being a hardware company, but a standards company
  3. The “digital hub” concept so far is pretty encompassing but to date, everyone forgets about the most common electronic device: the telephone
  4. A system that will connect to much more than just Mac users. Any OS where someone wants to support it.

Apple was afraid of being left behind with the Internet, after Microsoft got fussy, so they created Mail.app and Safari, to ensure Mac users always had the Internet (despite Firefox rocking on the Mac). Guess what the next big Application is? That’s right.

But Apple is a Hardware company

True, but there are still advantages. Besides for the fact that the OS is crucial to make a computer worth anything, did you think how much Phones can be worth? That’s right. Who is to say Apple or another company can’t make a landline phone that uses WiFi and/or Ethernet to plug right into the net? No more phone bills. Just use our sleek phone. Using iSync, it keeps in touch with your Address Book on your Mac, so your address book is on every iPhone in your home. It can go anywhere via WiFi using Airport. Use an Airport Express to extend the range so you can be in the backyard with your cordless phone. Does anyone see how much hardware software integration there is here?

This is a market ripe for Apple to pick. Not to mention Apple already has the perfect domain for to host the project: www.iphone.org

Mac OS X Address Book for Thunderbird

It should be great to read the Mac OS X Address Book from within Mozilla/Thunderbird. This patch is really a big leap for Mac OS X Thunderbird users. Thunderbird so far hasn’t had many of the integration features for the Mac like it has for the PC (mainly MAPI). So this is a big step on bringing it up to that level for the Mac.

What would be great is if we can get Sunbird, Camino and Firefox to start leveraging some of iSync’s power. Perhaps I’m dreaming, but it’s a sweet dream.

But for that we need Apple to release a SDK for iSync. Come on Apple!!! Someone should really start a campaign on this one. Would be nice to have the ability for third parties to write drivers for phones, web browsers, and other software to patch into the system.

On a sidenote, the contest is still running for a Gmail Account. Since most of the jokes so far are rather pathetic… I’m extending it. Come on people. I’m easy. All you have to do it tell a joke to get a chance. You control your odds. No bidding, begging, objectives. Just tell a joke ;-).

Safari Madness

I’ve used it before, but today I gave Safari a real go. Despite the fact that some bugs exist, it does a pretty good job. My biggest complement goes to the UI. It’s clean, simple, and totally Apple. It shares the same DNA as Steve Jobs.

I also like the snapback and iSync functionality. Some nice little Apple features make web browsing pleasant. Rendering is pretty good, fast, clean, and pretty compatible.

Still though, I favor Camino. From the pages I tested (including my own) it loaded faster, and had the best rendering of the two browsers (both of which blow Internet Explorer away). The biggest incompatibilities I’ve noted are mainly with JavaScript not functioning properly (especially sites with large complex scripts) or some XHTML pages. All of which Camino and Mozilla do very well.

IMHO the winner is still Camino, and the entire Gecko line of browsers, although Safari gets an honorable mention. It’s UI features are clearly superior.

I don’t think many sites will cater to KHTML browsers though. I think it’s much more likely for them to test in Netscape or other Gecko browsers, than KHTML based browsers. As a result, Gecko based browsers will most likely always have an upper hand in compatibility, unless KHTML manages to really keep up, despite the never ending obstacles that lie in it’s way.

A side note: I’m need to check out OmniWeb (the WebCore version), and give that a go. I haven’t gotten to that yet.