[英]Lightweight migration completed notification
I've been using lightweight migration for several versions successfully, but in my newest version I need to load some tables that are created during the migration with data after the migration completes. 我已经成功地为多个版本使用轻量级迁移,但在我的最新版本中,我需要加载一些在迁移完成后使用数据迁移期间创建的表。 I imagine it's possible that when my initial UIViewController
calls the method to load data into the new tables, the migration hasn't completed and the app will crash, so: 我想可能当我的初始UIViewController
调用方法将数据加载到新表时,迁移尚未完成,应用程序将崩溃,因此:
How can I determine that lightweight migration has completed? 如何确定轻量级迁移已完成?
The automatic lightweight migration happens when you call addPersistentStoreWithType:...
with the corresponding options, and is completed when that call returns. 当您使用相应的选项调用addPersistentStoreWithType:...
,会发生自动轻量级迁移,并在该调用返回时完成。 There is no asynchronous migration in the background. 后台没有异步迁移。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.