开发者

adding a field to database without crashing the existing appstore app

I have a published app in the appstore. Recent changes to the app require me to add an extra field in the 开发者_如何转开发CoreData db.

If i do this without altering the other fields, will the update be succesful?

If not, how can i add a field to the db without damaging the app for the clients that already had the app?


You need to use Core Data Migration to do this. You should be able to do it with Lightweight Migration, which means it can be done automatically.

This is covered very well in a number of tutorials and examples. Here is a link. Look at the accepted answer to that question.

Here is another one: Can I use “Automatic Lightweight Migration” if my already release v1 didn't have a versioned Core Data model? That should set your mind at ease.

Here is a tutorial that is a little easier to digest.

I have used automatic lightweight migration, and it is painless for the type of change you are describing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜