I'm struggling with a store which is using local storage. It isn't that hard to set up the store, and get it to work.(adding/changing/deleting records) After a few bugs and workarounds I got everyting up and running.
My problem is however that when I start adding records to the store, sometimes other records disappear. Most of the times, it works well, but sometimes records disappear and the application crashes the next time it loads, because the proxy reference to that non-existing record is still there. The proxy references(if you view local storage items in Safari console) still point to a record which has disappeared.(e.g.: ext-record-162, which existed before and is now gone) I use the store.add() method, so no weird coding whatsoever.
I've got two questions:
Is it possible to use a store with localstorage, which is 100% reliable?
Or am I using the wrong tool: saving +1000 records using local storage
I will look into sqlite now, maybe that brings the solution I'm looking for.
In iOS 5.1, this data is no longer considered persistent and is treated as temporary or transitory data, so iOS can destroy it at any time, without warning, including during low memory scenarios.