Home > Features > Syncing


August 27, 2012


As more and more people are buying multiple devices, it is natural to expect that they should all be able to access the same data.

This post is intended to cover some of the background about where your data is stored, and how syncing between devices might be achieved.

Data and Backups
First of all each device might run the same version of an app, however the data you are seeing only exists on the device itself. If you lose your device, or delete the app, you will of course lose your data too.

Apple provide two backup solutions (iTunes and iCloud), however all they do is allow you to store your apps and data on your computer or in the “cloud” for safety. They are not in themselves a way of sharing data (i.e. syncing) between devices.

Syncing (i.e. data synchronisation)
Syncing is actually VERY complicated. As the devices aren’t all running your app at the same time, you essentially need somewhere else to store your shared data. iCloud itself could be used for this purpose, as could Dropbox or any other cloud-based storage/server.

When do you write changes? You could do this every time you add or edit something, or you could batch up changes and write them when you are done. To me the best time to do this is when you close the app, however since you can’t run in the background for long, that rules out pretty much everything except iCloud. The latter is simply a local copy on your device, and the operating system (iOS) takes care of the rest.

Did I mention it was slow? Not the actual write itself, but copying data between devices. It can easily take 30 seconds or even minutes for your data to appear in the cloud, and then on other devices. And this assumes you have network connectivity (which you might not have).

This delay causes another major issue: handling conflicts. If two people are editing the same data at the same time, you somehow have to figure out what the end result should be. Asking the user what to do for each conflict would be too painful on a device as small as an iPhone.

Use Cases
This brings me on to why syncing is needed, and I think the answer depends on the app.

I can certainly understand that two people with a joint bank account might both want to add and edit transactions in the same database, which is probably the most complicated use case. But iCloud is not a great solution for this, as it is not designed to share data between users at all. It is there to make it easy for one person to see their data on multiple devices.

All of my apps already support data sharing using the backups feature. You basically make a backup on one device, copy the file to another device (iCloud makes this easy) and then restore it. I have therefore just spent most of the weekend heavily optimising this use case as follows …

1. If you have made any changes to your data, when you close the app a new backup is made and copied to iCloud. No user intervention needed.

2. When you are running the app, it will check to see if there are any newer backups available in the background. If so, a popup asks you to install it.

3. Backup management (i.e. automatically deleting older backups).

The single user use case is therefore solved with a SINGLE tap on the receiving device, with two conditions:

1. that you know you are essentially overwriting your data and not to go editing things on multiple devices at the same time (this eliminates the conflict resolution issue).

2. that you are aware of the amount of data you are copying (i.e. the whole database). The latter is fine on WiFi of course, especially for Hill Lists and Meter Readings.

To solve the multi-user use case, I need a better place to store the changes (probably not iCloud), and I need to optimise the amount of data being copied (e.g. only sending the changes themselves). For the record, I have a good handle on the last bit …

  1. November 12, 2012 at 4:27 pm

    hi Graham
    I can back up OK, but my iPad will not load the URL that the app gives me. So I cannot then import the data I have on my iPhone onto this. Do you know what is going on?

    • November 12, 2012 at 6:03 pm

      Hi, you can’t use WiFi to send a file between two iOS devices, you need a computer in the middle to store and push the file to the receiving device. Use one of the other methods, e.g. iCloud or Dropbox … etc.

  2. Mick Hawkes
    October 20, 2012 at 7:12 am

    Reading the above details about syncing am i correct in assuming that the multilple user scenario is more likely in Accounts and that the way data is synced is different to Meter Eeadings? I have meter readings and accounts. If I create a MR’s backup on my iPhone (using cloud as storage), next time I open the app on my iPad I get a pop-up asking if I want to update to the latest backup. This does not happen with accounts; when I want to update my iPad I have to manually go to backups, refresh the page, select the backup and restore.

    It seems like the accounts backups from the cloud are not being automatically retrieved across all devices after being created. Is this normal.

    Thanks for two great apps.


    • October 20, 2012 at 10:59 am

      Hi Mick, yes. Account Tracker is much more likely to have a LOT of data, and you don’t want to be copying the entire database around for every little change. Rather just the per-transaction changes will be synced between devices. Note that backup files are automatically pushed between devices in Account Tracker, however you have to manually create each backup and also manually select and restore them.

  3. Dave Coleman
    October 9, 2012 at 3:40 pm

    Sorry, treat me as a technical idiot. I have Account Tracker on my ipad1 and iphone 4S. I was using my ipad for months before buying my iphone so have all my account detail here. How do I transfer this information, and ongoing changes (sync), with my iphone?

  4. Ian
    September 7, 2012 at 3:54 pm

    Can’t wait for the syncing, the auto backup with a check for newer files would be a great start, but sometimes I don’t close the app, just move on to whatever I am doing next, so a real time transaction based sync would be safer.

    Love the app, support is the best I’ve had from any app developer, for this alone I continue to use Accounts and hope you get this sorted soon.

    • September 7, 2012 at 8:08 pm

      Hi Ian, by close the app I mean pressing the Home button. Everyone does that, otherwise you can’t run any other apps. 🙂

  5. Jude Selby
    September 7, 2012 at 11:41 am

    Hi Graham

    I am trying to re-grant my backup on iphone and it keeps fails when I add itunes password?

    Can you assist?

    • September 7, 2012 at 8:06 pm

      Hi Jude, I am not sure exactly what you mean. I will send you an email.

  6. Andy R
    September 3, 2012 at 2:43 pm

    Wishing you best of luck on sync. Would be a brilliant addition.
    Consider compression for the main backup as I can zip these backups down to 10% of their size sometimes.
    Keeping things transaction (database not financial) based in the cloud could be good; a current representation of the database that you can sync with per transaction. So newer database transactions on top and apply them to the client database on sync reporting conflicts.
    I can foresee the challenges ahead though; and thus wish the best of luck with it.

    • September 3, 2012 at 9:13 pm

      Hi Andy, there are many challenges. For instance lets say for each change set you create a file on iCloud so other devices can see it. Clearly you want to be able to remove these files over time, but when is it safe to do that? For instance you might want to add a third or forth device, at any time (perhaps months after you enable syncing). As you say, there are many challenges!!

  7. Alan
    August 31, 2012 at 10:25 am

    Hi Graham,
    Nice meters app. Well done. I came across it by accident and have spent an evening putting in mu meters including solar. I have this on iPad and have now installed on iPhone. I followed above and purchased the iCloud sync etc. but when i try to restore on iPhone it says that unable to contact iCloud. My iCloud is on as other things use it but if I look in its settings iCloud meters does not appear as an app. Should it?
    Have I done something very wrong? I’ll probs only use on iPad anyway but nice to have it on iPhone too. I can play with it on the train!


    • Alan
      August 31, 2012 at 2:08 pm

      Sorted. I had backup to iCloud turned off. When turned back on all synch d up okay. Well backup and restore to iphone.

      Thanks once again for a great app. I’ll have a look at your others now!
      Have a good weekend.

  8. neil
    August 30, 2012 at 5:17 pm

    Good luck with that Graham. For the record I love account tracker cos it’s simple. Though I’d like multi user/device syncing for me it would be a step backward if it meant my data got confused.

    • August 30, 2012 at 6:05 pm

      Hi Neil, what would be a step backwards? And how do you think I should share data between different users? Dropbox perhaps?

      • neil
        August 30, 2012 at 8:00 pm

        Should have said “for me” it would be a backwards step.

        I have such terrible memories of using what I suppose would consider themselves bells and whistles personal finance programmes (Quicken and then Money). Particularly when trying to reconcile with other versions of my financial details (eg banks or mobile versions of Money – things never worked very well and used to need me constantly to be correcting one version or another.
        The description of having to repeatedly install the most up to date back up fills me with foreboding.

        Don’t get me wrong, if it works it would be great and I know many people have asked for syncing; it’s just for me account tracker’s USP is its simplicity of use – given the choice I’d forgo further features if they could only be implemented by making the program trickier to use.

        • August 31, 2012 at 10:07 pm

          Hi Neil, the notification would only ever be posted if you have another device that has made more recent changes to your data. If you only have one device, or you didn’t change things on another device, no copying or syncing would be required.

  9. James
    August 29, 2012 at 7:01 pm

    Would be great for auto syncing to be available when you can work it out!! Just tried moneywiz which has the autosync capability between iPad, iMac and iPhone but the usability of the app itself is no where near as good as Account Tracker so I’ve got rid of that one and will have to wait until you come up with a solution. Are there any plans for a mac version?

    • August 29, 2012 at 7:46 pm

      Hi James, if the “single user” use case (as described) works for you, I should get that out in a few weeks.

      Moneywiz solves the “where to store your data” problem by having their own server, something you (as a user) would have to trust. They also send changes very regularly, when they happen. Doing so lets them push all edits to a device when it connects without worrying about storage limits or copying data to every device (like iCloud would do). Incidently it took them 6 MONTHS to design and develop, which goes to show how complex an issue this really is.

      On a Mac version, see https://grahamhaley.co.uk/2012/05/07/account-tracker-for-mac-update-2/ (although I am not making much progress).

  1. August 28, 2012 at 9:08 am
Comments are closed.