I have been reading so many topics here about this, but I could not have found it yet.
I want to have a UITableView where I can put some dictionaries and inside them, have words with some fields (about 4). So far it is ok, but my question is what is the best way to don’t erase the data after upgrading the app to a new version. I mean, when an user upgrade the app, all those words/dictionaries won’t be deleted because of the update.
I don’t know if I should use a NSMutableArray of class of words (for example), or use Core Data, or SQLite.
Any help would be very appreciated.
Thanks in advance.
If you have dictionaries that are in fact NSDictionaries, serializing them using NSCoding protocol to a file inside of the documents is easy, fast and reliable. The contents of the Documents directory remain unchanged if you do an upgrade of the app.
This is the code I use in one of my apps (it saves a list of quotes that has been favorited by the user)
You can add more objects to the
rootObjectas long as they conform to NSCoding Protocol.