iOS: Migrating existing Core Data-database into iCloud

元气小坏坏 提交于 2019-12-03 07:43:03

Look up the WWDC 2012 session Using CoreData with iCloud. They discuss this during the final section, under the topic of seeding. They also have some sample code that you can get from the site that has an example. In short, you will have to open 2 persistent stores, set a fetch size, then grab batches from the source, loop through them and add them to the new store, and at batch size intervals, save and reset. Pretty simple.

Check out WWDC 2012 - Using core data with iCloud. This technique is called seeding. Find the sample code at https://github.com/jab5990/TestCDiCloud/tree/master/Shared

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!