开发者

Does data base change with new update iPhone app

I have a program that my user save something on it. I want to release new version.

My question is: if my users update their app, wil开发者_开发问答l their data still be there or not?

My new release its not part of database.


When you update an app, the data is preserved. As far as I am aware, the process is the same as when you test a new build from Xcode.

The only time this could be an issue is if you are using CoreData, and you update your model. In this case, the old store will not work with your new model unless you migrate the old store. Apple has documentation on migrating CoreData stores here.


The database will be in sandbox of the app. So until user deleted the app the database will be there. You can upgrade the app. But if there is something changes into database then you again need to copy the new database to documents directory either by installing the app again and remove the older version Or by manage through code.


All contents of the Documents directory on device is preserved, update only replaces the application bundle, which is read-only anyway.


Can you please let us know for saving what kind of data model you are using, whether Core Data stack or SQLite. If you are using one of them, its pretty obvious you have to write and fetch your DB from documents directory. If your new version does not contain one, it wont work either.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜