开发者

Persistant Store and App Update

I have an iPhone app up on the store which uses core data. Now, every time I change something in my code with relation to 开发者_开发技巧core data, namely my managedobjectmodel or my model classes, I have to wipe all my data since I get a persistent store error.

Now I'm finding i need to make changes to my app and I don't want my users to lose all their data. What do I do? This is my first foray into Core Data so any help is appreciated. Thanks.


You need to version your data model. Check out Xcode > Design > Data Model. Then you need to migrate the data to the new model. This can get complicated depending on the changes.

Try this documentation.


Never mind. It's versioning and migration that I need to look into, no bother.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜