Does CoreData persist the user data after I upgrade the app? Otherwise I'd need to write a web services with a db to persists the user data.
Thanks in advance!
We use CoreData to manage data layer. Persistence is just one aspect of data layer management. CoreData ( data layer management framework) saves data into something called a persistent store. The store is where the data lives. There are 3 different types of stores CoreData supports on iOS;
CoreData ( data layer management framework) saves data into something called a persistent store. The store is where the data lives. There are 3 different types of stores CoreData supports on iOS; SQLite is almost always the right choice of your persistent store in a SQL relational database.
There are 3 different types of stores CoreData supports on iOS; SQLite is almost always the right choice of your persistent store in a SQL relational database. Binary store can be appropriate when you always need the database to be read and written in its entirety.
Although Core Data is a great solution for persisting data that has structure and relationships, other solutions are better suited for other types of data. For settings or small pieces of data, UserDefaults is most appropriate.
If you store your data in the application's documents directory, you don't need to update your database or settings if you are just upgrading the app. If you delete the app from the device, then the documents is also deleted, in which case you will have to recreate your data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With