iPhone supports IMAP IDLE
By chienr on Nov 01, 2007
Now that IMAP IDLE support in Gmail is confirmed, the logical next step is to see if iPhone supports it as well, and more importantly perhaps, how much value does it add over client-side polling? The short answer is yes, iPhone has IMAP IDLE, but updates don't come in real time. Here's how I tested it (on a Wi-Fi connection, firmware 1.1.1):
- Under Settings -> Mail, make sure Auto-Check is set to Manual
- Under Settings -> General, make sure Auto-Lock is set of Never
- Open my Gmail Inbox on the iPhone
- Create an IMAP IDLE session to my Gmail Inbox using
- Send a test message to my Gmail account
I repeated the test 3 times. The messages took 2-4 minutes to show up on the iPhone so there's quite a bit of delay. Header information shows end-to-end delivery times of 3-14 seconds so the delay isn't in SMTP. In the IMAP IDLE session, the server transmitted updates also within seconds so the delay isn't in IMAP either. I believe it's fair to conclude that the delay is caused by iPhone, specifically the way it handles IMAP IDLE. My guess is the designers opted for battery conservation over speed of new mail notification.
Then how much better is push IMAP than pull IMAP? Based on the above, I'd have to say not much, at least not on iPhone.
[UPDATE Feb 21, 2008] Part 2: turns out iPhone does not support IDLE.