On this week’s Build & Analyze, Marco mentioned that sometimes his calendars in iCloud weren’t updating until the app itself was open. I’ve had a fair bit of trouble with iCloud so far (my iTunes match playlists are currently missing from my phone, and my bookmarks seem to be a total mess at the moment), and I’ve noticed this behavior as well. It’s hard to trust a new piece of technology until you really understand how it works, and iCloud especially is completely impenetrable.

I set out to rigorously test iCloud and try to understand it’s underpinnings, both in the OS and in the clowncloud. What I found, perhaps unsurprisingly, is that it mostly works as expected. My Mac runs OS X Lion 10.7.3, and my iPhone 4S and iPad 1 both run 5.0.1.

Photostream

Photostream only works on WiFi, exactly as it’s billed. I took a photo on my phone while it was on 3G, waited a few minutes with my eye on iPhoto on my Mac, and didn’t see anything. I switched the WiFi on the phone on, waited in Settings.app, and saw the photo show up in iPhoto after a few moments. I also was curious to see if photos would upload with the screen off, so I took a photo with double-click shortcut, and turned the phone’s screen off immediately. The photo was added to my Photostream, just as expected.

Contacts and Calendar

I performed several tests with these apps. I varied things like the action (creation vs editing), the state of the app (active, suspended in memory, force-quit from the multitasking tray), and internet connectivity (3G, WiFi, wired). Here are the different tests that I did:

  1. Created a contact on my Mac, with the Contacts tab of the Phone app open. I watched the contact get pushed and the view get updated with no interaction from me.

  2. Edited the contact on my Mac with the app on my phone suspended, with WiFi on. I waited about a minute and a half, turned on Airplane Mode, and went to the Contacts tab of the Phone app. This edit did not propagate.

  3. Created a calendar event on my Mac, with the apps not-yet-opened on my phone and iPad. I left WiFi on for a few minutes, on each device, before turning on Airplane Mode, and checking each device’s Calendar app. The event had been created on both devices.

  4. Turned off WiFi and edited the event on the iPad, switched to Settings, and turned on WiFi. The change to the event showed up on all devices.

  5. Did the same test again, but before turning WiFi back on, I force-quit the Calendar app on the iPad. Change propagated.

  6. Retested Contacts, wondering if the failure was a fluke or a difference between Contacts and Calendar. I modified the contact on my phone over 3G, and watched it update in Address Book on my Mac. I also turned on WiFi on my iPad for a few minutes, turned it off, and checked the contacts, and it was updated.

Basically, any combination of factors I threw at it worked fine. iCloud can receive changes and updates when the app is force-quit, suspended, active, or not-yet-opened. It can also send updates if a device was in airplane mode, and gets a connection sometime later. The operative word, however, is can.

For some reason, test 2 failed. I’m not sure why the first backgrounded Contacts test failed. If Siri is any indication, it’s possible that iCloud is overwhelmed fairly often, and it doesn’t complete pushes. It’s also possible that pushes are ignored when the device is hibernating (which is how the iPad and MacBook Air can have sleep times of close to a month), but I was under the impression that it was built on the same framework as SMSes and push notifications, which you certainly can get while the device is “hibernating”.

Third-Party Apps

I don’t have any third-party apps that use iCloud. I tried to do some testing with FlightTrack Pro, but I couldn’t even get iCloud syncing to work when the connection was active on both devices. If you find anything interesting, please be sure to let me know.

Pages, Keynote, & Numbers

John Gruber mentioned in last week’s Talk Show (I listen to too many podcasts) that Schiller and the other Apple reps managed to get a flawless demonstration of Pages live-updating between Macs and iDevices, so I thought this was a new Mountain Lion feature, but it seems that Pages on the iPad and the iPhone can do this today. If you have one document open on both devices, you can make a change on one, it’ll show you an alert telling you that the other device is editing and when you dismiss the alert, the changes show up, live, on the second device.