tantek.com

How To Lose Your Data In Apple iOS Notes In Five Easy Steps

on (ttk.me b/4TG1) using BBEdit

Or, why is it so hard to get syncing of simple text notes right?

  1. Create a note in Notes on your iOS device (e.g. iPod) with some text like "Note to self: do not save anything valuable in Notes".
  2. Connect it to your Mac and (Sync) with iTunes, disconnect
  3. Open Mail.app and delete the note on your laptop
  4. Add something to the note on your iOS device, e.g. "Note 2: Well maybe I'll try adding something anyway."
  5. Reconnect them and (Sync) with iTunes again, disconnect

At this point you've lost the entire note on both devices, including additions you made to it on your iOS device after you deleted the copy of it on your laptop.

If you're doubly unfortunate, iTunes has also thrown away the previous backup for your iOS device, keeping only the most recent "backup" for your iOS device, with, you guessed it, the deletion of that note.

The very act of attempting to backup your iOS device by explicitly syncing it with iTunes, was responsible for losing your data.

iTunes treated the copy of the note on your laptop (or rather the tombstone left in place after you deleted it) as more authoritative than the note on your iOS device - ignoring the fact that you explicitly added to the note on your iOS device after (time-wise) you deleted the copy of it in Mail.app.

iTunes treated the data you added as less important than your older act of deletion and threw away your data.

What should it have done instead? How should it have resolved a seeming conflict between a deletion and an addition, both of which happened after the most recent sync?

Principles

There are a couple of user interface principles to consider here. Quoting from Apple's own OSX Human Interface Guidelines:

Forgiveness

People need to feel that they can try things without damaging the system or jeopardizing their data. Create safety nets, such as the Undo and Revert to Saved commands, so that people will feel comfortable learning and using your product.

Warn users when they initiate a task that will cause irreversible loss of data.

Using iTunes sync jeopardized data. It removed the safety net of the previous iOS device backup. There is no command to Undo a sync or Revert to notes from before. iTunes did not warn before it itself caused an irreversible loss of data.

Next principle, same source:

User Control

The key is to provide users with the capabilities they need while helping them avoid dangerous, irreversible actions. For example, in situations where the user might destroy data accidentally, you should always provide a warning, but allow the user to proceed if they choose.

iTunes provided no warning before an irreversible deletion of the note on the iOS device which yes, did destroy data.

Instead of Deleting

There are several approaches that Apple could have taken, any one of these would have been better than the irrecoverable deletion that occurred.

Why not iOS7 and MacOS Mavericks

Perhaps you're wondering what versions of operating systems (and iTunes) were used: iOS 6, MacOS 10.7, iTunes 10.

Why not upgrade to iOS 7 and MacOS Mavericks (and thus iTunes 11) ?

Because then you lose the ability to sync directly between your devices. As noted previously:

[...] If you use OS X Mavericks v.10.9 or later, your contacts, calendars, and other info are updated on your computers and iOS devices via iCloud. [...]

If Apple can't get syncing right between just two devices/destinations:

iOS device <---> Mac laptop

Why should anyone have any expectation that they can get it right among three?

iOS device <---> iCloud <---> Mac laptop

Towards Indie Note Editing And Sync

This episode has illustrated that we cannot trust even Apple to either follow its own user interface guidelines, or implement those guidelines in its own software, nor can we trust Apple's syncing solutions to not lose our data.

I am now investigating alternatives (preferably open source) for:

Preferably without having to use "the cloud" (otherwise known as the internet or the web). That being said, perhaps an open source indie web sync solution could be another path forward. If I could sync any number of my own devices either with each other or directly with my own personal web site, that might work too.

Suggestions welcome. Some discussion already documented on indiewebcamp.com/sync.