且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

奇怪的应用程序崩溃在iPhone - 不被苹果拒绝

更新时间:2022-12-21 14:51:10

您可以尝试这样:无法找到源存储的模型。根据作者,无法找到源存储的模型意味着您的对象模型和生成/编码的模型代码不同步,或者您的数据库未正确迁移/升级到新版本。他建议使用这个代码:

You might try this: Can’t find model for source store. According to the author, "Can't find model for source store" "means that either your object model and generated/coded model codes are out of sync or your db is not migrated/upgraded correctly to the new version." He recommends using this code:

 NSDictionary *optionsForSTore = [NSDictionary dictionaryWithObjectsAndKeys: 

 [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,

 [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];