开发者

How do I create an instance of my new entity as part of a core data migration?

We have an app with a versioned core data model, and we're setting the NSMigratePersistentStoresAutomaticallyOpt开发者_Go百科ion and NSInferMappingModelAutomaticallyOption options to handle the migration at the moment. The new version contains a DataUpdate entity which represents the last time the cached data was updated. The first version shipped with some cached data, and I want the migration to create a DataUpdate with the date of that cached data, so that the app doesn't need to download it all again from scratch.

What do I need to do to get the app to create the DataUpdate during the migration? Will I need to take over the whole migration process, or can I let it automatically infer the rest of the migration?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜