Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does CoreData persist the data after I upgrade the app?

Tags:

ios

core-data

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!

like image 761
sonoluminescence Avatar asked Nov 27 '11 07:11

sonoluminescence


People also ask

What is the difference between coredata and persistence?

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;

Where does coredata store data?

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.

What types of persistent stores does coredata support on iOS?

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.

Is core data the best solution for persisting data?

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.


1 Answers

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.

like image 177
Abizern Avatar answered Oct 13 '22 23:10

Abizern