Core Data Exist after deleting APP or Reseting SImulator?

In Core Data By Tutorials V3.1, at the end of Chapter1, I see this content :
“Great! They’re back from the dead (pun intended). Add a few more names to the list and restart the app to verify saving and fetching are working. Short of deleting the app, resetting the Simulator or throwing your phone off a tall building, the names will appear in the table view no matter what.”

I test myself, when I delete the app or reset the simulator , My data saved in the Core data was lost.
The author was wrong, or I misunderstood ?

I think you misunderstood his statement :slight_smile:

When the author states:

“Short of deleting the app, resetting the Simulator or throwing your phone off a tall building, the names will appear in the table view no matter what.”

What the author means is, “as long as you DON’T delete the app, DON’T reset the simulator, or DON’T throw your phone off a tall building (i.e. essentially destroy your iPhone), the names will appear in the table view no matter what.”

Think of Core Data or any permanent storage utility as a filing cabinet. If you store the records in the filing cabinet, they will be there when you come back to it. However, IF someone destroys the filing cabinet, or someone goes, and replaces the filing cabinet (containing all the records), with a brand new one, then of course, those records that you put inside the original filing cabinet will not be there.

By deleting the app, or resetting the simulator, you have done essentially the same thing. The way your data stored in Core Data will persist, even IF you delete your app, or reset the simulator would be if you chose to use a cloud service like CloudKit to move the data from your phone to the cloud.

I hope this clarifies everything for you :slight_smile:

Thank you very much. You are a so good man. That is very clear for me. :grin:

Thanks very much for your kind words! I’m very happy to help :slight_smile:

Take care!