Archive

Archive for August, 2012

Syncing

August 27, 2012 Comments off

icloudicons


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

Solutions?
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 …

Account Tracker (Free) 3.8.3 now available

August 22, 2012 Comments off

This is a minor upgrade to the free version only.

Improved the getting started tour (now just 3 screens), and added a link to my Top 10 Tips from the Help button.

Added support for iCloud in the free version.

Made the upgrade option and data export to the full version more explicit.

Changes to Dropbox support

August 18, 2012 Comments off

iosicons


I have just been informed that Dropbox will be deprecating the APIs I am using on 1st December. Nothing serious, they just want people to move to their latest code. I guess I should have moved a while back, but why changing something that isn’t broken? 🙂

Fortunately the changes are fairly minor, and the only one you will notice is the way you link my apps to Dropbox itself.

I am now in the process of making these changes, the first of which I have now done and submitted to Apple for approval (my Man 3 app, version 1.2). My other apps will follow soon …

UPDATE 1: it seems their new API has a couple of bugs, and I am working with one of their engineers to get them fixed. Basically using it causes a crash on older devices that they claim to support.

UPDATE 2: iOS version 3.1.3 is no longer supported by Dropbox. Version 4.0 will be the minimum I can support moving forwards. I suspect this won’t really be an issue, and it wouldn’t surprise me if Apple drop support for iOS 3 next month.

Account Tracker user interface tips

August 14, 2012 Comments off

One of the challenges of designing such a powerful mobile app is getting the balance right between helping new users and not cluttering up the limited space with help buttons and text. I have chosen to keep the UI as clean as possible, however there are a few “more subtle” areas that need some explanation, hence these tips.

On the main Accounts screen, tap the total at the top to change the balances shown (between today’s, available, minimum and reconciled). You can also use the right arrow to step through these options.

When you select Edit, you will see three horizontal bars to the right of each row. Touch, hold and drag these to change the order of your accounts. This technique can also be used to move accounts between groups.

While editing, you can enable three transaction views at the bottom. All/recurring transactions shows all transactions up to today, Scheduled shows all transactions from today to the end of next month, and Reminders shows all transactions with the reminder switch set.

Whenever you see the blue arrows/buttons, tapping them does something different than tapping the rows themselves. On the main Accounts screen they let you change an account’s settings, on an individual account screen they let you copy or move transactions quickly, and on the Budgets screen they let you set, change or delete budgets.

On the individual account screen, the left arrow scrolls to the top of the list, the balance itself scrolls to make the most recent transaction visible and the right arrow scrolls to the end of the list. Tapping the right arrow again will add a month at a time, right out to 2 years into the future.

To manually reconcile (i.e. tick off) transactions, turn on Reconcile by Transaction in the settings, then tap the tick button. Your reconciled balance will be shown as you do this.

On the Budgets and Reports screens, you can change the period (e.g. to daily, weekly, biweekly/fortnightly, yearly or even custom dates). Simply tap on the date(s) at the top of the screen. Use the arrows to step through each period (or to set custom dates).

The Reports screen includes 7 separate reports, and to switch between them simply scroll or swipe left and right. The small dots at the bottom tell you where you are.

When viewing the pie charts, only the top categories/details are shown due to space limitations. To view all categories/details, tap on the List button at the top right. To return to the charts, tap on the Charts button (again, top right).

Finally use the Help button on the Settings screen to view the user guide, and also to link to my support pages. If in doubt, please get in touch for help!

Hopefully you will find these useful.