ios - 当我想使用 CoreData 保存数据时出现错误,例如 The Model used to Open the store is incompatible with the one used to create the store

标签 ios

enter image description here

当我想使用 CoreData 保存数据时出现错误,例如 The Model used to Open the store is incompatible with the one used to create the store

更多细节见图片

最佳答案

D 拉马纳,

您的设备/模拟器可能有较旧的应用程序实例,您必须修改 coredata 的数据模型而没有创建 coredata 模型的版本。

解决方案:

卸载现有的应用程序实例重新运行应该可以正常工作:)

提示:

如果您将产品推向市场并在未创建版本的情况下修改数据模型并重新发布应用程序的更新版本,这可能是一个严重的问题。您的所有用户都会遇到此崩溃,除非他们卸载并重新安装它。

考虑在修改现有数据模型之前创建核心数据模型的版本。

关于ios - 当我想使用 CoreData 保存数据时出现错误,例如 The Model used to Open the store is incompatible with the one used to create the store,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37348514/

相关文章:

ios - 在 iOs 应用商店中完成 App 的新安装而不是 'update'?

ios - 当上面有其他内容且大小灵活时,objc xcode 设置 uitableview 单元格的 y 起始位置

ios - CodeSign 问题 : resource-rules (deprecated in Mac OS X >= 10. 10)

ios - Xamarin ios,sqlite 返回表中的 0 列

iphone - 从UIButton获取位置坐标

ios - 如何正确使用Django(Web和移动部署)

ios - Xcode 警告符号 - 带有白色圆圈的黄色三角形?

ios - 如何在 Collection View 中添加 indexTitles? (iOS 10+)

ios - 使用 Xamarin 的简单多列表

ios - 如何在 OauthSwift 库中设置回调 URL