开发者

Manual migartion Data model

开发者 https://www.devze.com 2023-03-30 20:18 出处:网络
I am new to core data. when ever i add an entity or delete any entity, my app is getting crashed and i am loosing the data. I gone through the apple docs and found that开发者_高级运维 when ever change

I am new to core data. when ever i add an entity or delete any entity, my app is getting crashed and i am loosing the data. I gone through the apple docs and found that开发者_高级运维 when ever changes are made to model the we need migrate the current version to new version. Light weight migration will not support for enitity deletion sort of things. Can anyone lemme know what is source and destination model? how should i do manual migration? In my app i frequently change the data model. If i delete and run the app users are loosing their data. Please lemme know how to do manual migration in detail?. Thanks in advance.


Normally you don't have to migration it by yourself. The only thing you need to do is add a new Data model version, select the new version as current version, and then you can edit your new version now, Core Data will do the migration work for you.

0

精彩评论

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