mafiOSo
mafiOSo

Reputation: 183

Persist user data without external database

I'm still very new to iOS but I think I at least have a basic grasp around the sandbox and data persistence. I would just like to confirm something. I want to make an app that stores user favorites (just plist type data). The thing is, this is an in-house solution and I will be pushing updates to devices quite frequently. My question is, is it possible to persist the user information without storing that information in an external database?

The way I understood it was once you upload a new IPA and the user updates, the old IPA is completely gone which implies that the sandbox directory is completely overwritten which includes any type of locally persisted data within the app.

Am I wrong? Is storing the user favorites on an external database the only way to keep a user from losing their favorites when the app updates?

Upvotes: 0

Views: 167

Answers (1)

rmaddy
rmaddy

Reputation: 318824

You are incorrect. When a user updates an app, the sandbox data is NOT wiped.

Can you imagine how much uproar there would be from the many millions of iOS users if their app data was lost every time they updated an app?

Keep data in the sandbox. It is safe as long as the app isn't deleted.

Upvotes: 2

Related Questions