XCode 4.3 无法加载持久存储 UserDictionary.sqlite

Posted

技术标签:

【中文标题】XCode 4.3 无法加载持久存储 UserDictionary.sqlite【英文标题】:XCode 4.3 Unable to load persistent store UserDictionary.sqlite 【发布时间】:2012-06-17 22:24:41 【问题描述】:

我已经在 ios 应用程序上工作了一段时间,突然每次我在 iOS 5.1 模拟器中运行应用程序时都会遇到以下崩溃。

该应用程序不使用 Core Data,我不确定是什么原因造成的。

我已经从模拟器中删除了应用程序,完成了清理并重新构建,但似乎没有任何帮助。

Unable to load persistent store at URL 'file://localhost/Users/jcottrell/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' (
    metadata =     
        NSPersistenceFrameworkVersion = 407;
        NSStoreModelVersionHashes =         
            UserDictionaryEntry = <f0c9025b 602122f9 37a4e274 bdaacec1 b9a66f83 fca5c43b bed5e80a 6baee338>;
        ;
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "43DABF34-7F7E-4FE9-B78D-8AF64292A967";
        "_NSAutoVacuumLevel" = 2;
    ;
    reason = "The model used to open the store is incompatible with the one used to create the store";
)

【问题讨论】:

您是否安装了更高版本的 Xcode (4.4 / 4.5)?我做到了,同样的问题也发生在我身上。 是的,我想这就是它的来源! 我在 4.5 预览版中也遇到了同样的问题。 :( 【参考方案1】:

我已经解决了这个问题。我点击了“iOS 模拟器”-> 重置内容和设置

【讨论】:

我昨天刚安装了xcode 4.5,不是预发布版,还是有同样的问题。谢谢 JonathanC,重置我的模拟器工作。【参考方案2】:

删除您提到的文件:/Users/jcottrell/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite 和随附的plist。这是一个仅限模拟器的问题,因此您可以忽略它。

【讨论】:

以上是关于XCode 4.3 无法加载持久存储 UserDictionary.sqlite的主要内容,如果未能解决你的问题,请参考以下文章

安装 Xcode 4.3 后无法获得 MacPort 功能

无法使用 Xcode 4.3 安装 autotest-fsevent gem

无法使用 TestFlight 安装 xCode 4.3 beta 应用程序

如何在 cellEdit 之后强制从持久存储重新加载核心数据

如何在 Xcode 4.3 上使用 JavaScript?

Xcode 4.3 没有正确链接到 ZbarSDK