【问题标题】:App crashes with SQLite error after updating from appstore从 appstore 更新后,应用程序因 SQLite 错误而崩溃
【发布时间】:2014-05-21 03:31:48
【问题描述】:

从 Appstore 更新应用程序后,它总是崩溃。我得到的错误是,

The model used to open the store is incompatible with the one used to create the store already updated app

为了解决这个问题,我按照this post 中说明的步骤进行操作。修复此问题后,我面临新错误,

Can't find model for source store.

在我的应用程序的更新版本中,我刚刚将一些属性从integer 16 更改为integer 32,仅此而已。我不知道任何其他解决方法可以解决我的用户发生的崩溃问题。如果用户删除旧版本的应用程序,然后安装最新的应用程序,它可以正常工作。

关于如何修复崩溃的任何指示?

【问题讨论】:

    标签: ios objective-c sqlite core-data core-data-migration


    【解决方案1】:

    您需要通过版本控制将核心数据迁移到较新的模型。参考链接http://9elements.com/io/index.php/customizing-core-data-migrations/

    【讨论】:

      【解决方案2】:

      您是否使用了自动映射? (如您发布的链接中所示)。如果是这样,正如之前的海报所提到的,你必须创建一个新的模型版本——点击你的模型,根据你当前的模型编辑“新模型”。新模型是您想要更改的模型,否则您的应用程序将崩溃。不要更改您当前的实时模型。

      当您说“如果用户删除当前版本”时,您指的是 beta 用户还是 App Store 用户?

      【讨论】:

        猜你喜欢
        • 2023-03-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多