开发者

Core Data Model change app update

I would like to update my app, but I have completely changed the data structure, so is th开发者_运维知识库e Core Data model entirely different. Now, the data in the app does not have to be preserved, but you can't just update the app with this new model as it will crash.

What is the best way to update my app?


You need to version the core data structure. Use this guide

http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/CoreDataVersioning/Articles/Introduction.html


If you have a completely new data model you might look into having a new database persistent-store/db file and run a merge function if the app can find an old database.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜