saving data
In my app I chose to use the NSUnarchiver/NSArchiver objects to read/write my data because implementation was very straightforward. Then, I save my data on app exit per recommendations I have seen. However, the problem is if users enter or change a lot of data and a crash happens they lose all their work for the session. Naturally I will try to resolve all crashes, but the data loss in the meantime seems unacceptable. So, I was considering switching to Core Data on the idea that it wrote changed data out more often. Because that involves quite a bit of work, I want to make sure I'm making the right decision in doing so. Does Core Data indeed write the data out more often? Is it worth the hurdle to do this? Also, I saw something that said writes on the iPhone were very expensive and negatively affected the lifetime of the device, which is why I chose to write the data on exit only in the first place. I could write the data using the archive methods more often, but that would potentially be a performance hit as I write out the full amount of data (vs Core Data writing only what has changed?). I'm looking for any advice on the best way to address these issues. thanks.
|