开发者

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

开发者 https://www.devze.com 2023-04-12 00:24 出处:网络
We have an app with a versioned core data model, and we\'re setting the NSMigratePersistentStoresAutomaticallyOpt开发者_Go百科ion and NSInferMappingModelAutomaticallyOption options to handle the migra

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

精彩评论

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

关注公众号