Apple added a subtle solution for developers in iOS 5.0.1 that addresses the issue of purged app data. In iOS 5.0, apps were suddenly restricted from caching large amounts of data in-app for offline access. Apps were effectively “cleaned” of temporary data when iOS 5 determined that the app was taking up too much space.
Previously, iOS would allow an app to store needed information, such as saved web articles for a news app, in a temporary cache that wouldn’t slow down iTunes backups, restores, and syncs. When Apple introduced iCloud, the company became more aggressive about not allowing apps to temporarily store too much information in-app.
“Instapaper has stored its downloaded articles in
Cachesfor years, since I didn’t want to slow down iTunes syncing for my customers or enlarge their backups unnecessarily, and full restores don’t happen often enough for it to be a problem for most people. This new policy now locks me into using
Caches: I no longer have a choice.
But in iOS 5, there’s an important change:
tmp— the only two directories that aren’t backed up — are “cleaned” out when the device is low on space.”
A real world example of the policy:
“A common scenario: an Instapaper customer is stocking up an iPad for a long flight. She syncs a bunch of movies and podcasts, downloads some magazines, and buys a few new games, leaving very little free space. Right before boarding, she remembers to download the newest issue of The Economist. (I think highly of my customers.) This causes free space to fall below the threshold that triggers the cleaner, which — in the background, unbeknownst to her — deletes everything that was saved in Instapaper. Later in the flight, with no internet connectivity, she goes to launch Instapaper and finds it completely empty.”
While we’ll have to wait to see how the new method Apple implemented in 5.0.1 plays out for developers, we can only hope that Apple has indeed remedied the issue entirely. No one wants their app data mysteriously disappearing..