Frustrated by the bizzare rules that seem to govorn your iPhone data use? Maybe you turned off push synchronization to save on battery life, but your left wondering if and when your data will sync. This article may help.
I am planning a trip to Africa where data access is expensive, so I needed better understanding of when, exactly, the iPhone reaches over the network. In the process, I learned quite a bit about how mobileme synchronization works. If you have any more to share, leave your insights in the comments and I will update this article.
Here are my conclusions so far based on a series of packet sniffing experiments. I should mention that all traffic is encrypted, so the sniffer was only useful to measuring the timing and amount of information exchanged.
- The most conservative data use sync options are to turn the master “push” switch off and to set the fetch settings to manual. When that happens, calendars and contacts seem trigger an immediate sync when new items are added. Otherwise, there is no apparent periodic traffic unless you trigger a manual sync (done by entering the application itself.)
- You trigger a manual sync by ENTERING the application whose data you want to sync. In the conservative settings, exiting and entering an application (contacts, calendar, etc) seems to remind the iphone to check for new data from mobileme.
- The iPhone will only perform a manual sync every few minutes, regardless of how many times you enter and exit the application. For instance, if at 5:52 PM you enter the calendar application, and update data you will trigger a sync. But if at 5:54 PM you enter the application again, you will not trigger any network traffic. If you enter at 5:55 PM you get a sync.
- When you trigger a sync, over then next 10-15 seconds the phone will reach out over the network and poll for updates.
- Once you’ve triggered a sync (for whatever reason), all updates for the application is exchanged with mobileme. Updates apply only to that application, so a sync on contacts does not necessarily update calendars.
- Even polling for new data is expensive – I typically measured 5KB-6KB traffic for an empty poll to check if data had changed.
- Some vaguely asynchronous application running on the iPhone is responsible for determining if the server should be polled. Its not the code of the application itself. Sometimes I was able to observe sync traffic even if the phone was recently placed in standby. Entering the calendar or contact application triggers this process to poll an exchange data.
- All data to the mobile me servers is in SSL (or at least occurs on port 443)