Archive for November 29, 2011

iCloud and real-time syncing of data

November 29, 2011 Comments off

As I am getting many requests per week asking about iCloud support and real-time syncing between devices, I thought I’d add this post to explain the current situation.

None of my apps support iCloud today (in fact very few do!!). However they all support the ability to backup your data, copy it between devices, and restore it. Of course what you all really want is the ability to change something on one device, and have it magically appear on the other, perhaps even having two people do updates simultaneously. There are many issues with this, some of which are helped by iCloud …

1) your data files can get quite large, especially with lots of transactions (e.g.). Copying to the cloud, and downloading this again could potentially take minutes or longer. So when do you do this? It would be frustrating at launch time, and you can’t wait until you press the Home button to copy back to the cloud as you only have 5 seconds of execution time for background processing. iCloud helps with this (a lot), letting you copy data locally, and it handles the copying in the background.

2) conflict resolution. While it sounds easy, what if two or more devices are offline for extended periods, all editing the same data. When they reconnect to the cloud, it all needs to be sorted out. This is especially difficult, and Apple have left it up to us developers to sort out (they can’t solve it for us, as we all store data in different formats).

UPDATE (8th December):

I plan to support iCloud in three steps. The first is to use it for backups only, a bit like Dropbox works today. When you make a backup, this will be copied to iCloud and then (over time) pushed to all of your other devices. Your other devices will see this new file in seconds, but if it has not been downloaded, it will be displayed in grey. Tapping on it will force a download, then tapping again will let you restore it. I have all of this working in Account Tracker today, so it will be in my next update (other apps will get this too).

The next step is more complicated, and that is to allow your data to be pushed to the iCloud automatically (without backing up), such that other devices can always be using the latest data. While this sounds simple, there are a few issues to resolve first (like preventing simultaneous updates, and when to copy your data).

Finally, the highly complex issue of syncing simultaneous changes needs to be addressed. This is likely to take time to design and implement a workable solution. Please be patient! 🙂