【问题标题】:App Crashes because of Core Data核心数据导致应用崩溃
【发布时间】:2013-11-07 21:57:06
【问题描述】:

我的应用更新今天被接受,当你尝试打开它时它崩溃了。它停止崩溃的唯一方法是删除它并重新安装它。我认为应用程序崩溃的原因是每当我对 Core Data 中的实体进行更改并创建一个新的 NSManagedObjectClass 时。崩溃消息:

reason = "The model used to open the store is incompatible with the one used to create the store";

根据这个回答:The model used to open the store is incompatible with the one used to create the store

我必须删除应用程序并清理项目。现在更新在应用商店上,我该怎么做才能修复它?用户必须删除应用程序吗?这是唯一的方法吗?

谢谢,

阿卜杜拉·沙菲克

【问题讨论】:

  • 您有两个选择: 1. 希望用户尝试删除它并重新安装它,这可能不会发生 2. 照 Neal 所说的并迁移数据库。如果尚未通过审核,我建议拒绝更新并插入迁移代码。

标签: ios core-data crash


【解决方案1】:

问题在于您更改了数据模型。您需要迁移数据。这样做的方向是in this post。您应该尽快发布修补程序以添加迁移路径。

【讨论】:

    猜你喜欢
    • 2018-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-10
    • 2011-01-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多