iPhone supports IMAP IDLE

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):

  1. Under Settings -> Mail, make sure Auto-Check is set to Manual
  2. Under Settings -> General, make sure Auto-Lock is set of Never
  3. Open my Gmail Inbox on the iPhone
  4. Create an IMAP IDLE session to my Gmail Inbox using openssl(1)
  5. 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.

Comments:

is there a way to get push IMAP without keeping the mail app open? doesn't seem worth it from a battery life perspective, etc. to have to keep the mail app open and prevent the phone from sleeping - looks like there's an automatic disconnection from the server once you leave the mail app

Posted by n/a on November 02, 2007 at 02:08 AM PDT #

@n/a No as far as I can tell. I wonder how IMAP IDLE behaves on other mobile phones.

Posted by Robert Chien on November 05, 2007 at 09:49 AM PST #

I stumbled upon this application today which, among other features, notifies you when new mail comes in. It's called iMapIdle <http://iphone.rustyredwagon.com/>

Posted by Robert Chien on November 07, 2007 at 04:08 AM PST #

too bad this won't work with 2.1 firmware on 3G. Wish apps like these would be open source, or at least maintained, then I'd be happy to donate some €.

Posted by mltv on September 24, 2008 at 03:30 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

I currently live in San Francisco Bay Area. For the past seven years, I have been designing and building messaging solutions for Sun.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today