0

尝试使用 iOS 本机 API 连接到 Worklight 时,我在 Xcode 中遇到错误:

[ERROR] Worklight: +[WLCookieManager persistentStoreCoordinator]:326::Unresolved error creating persistent store Error Domain=NSCocoaErrorDomain Code=134130 "The operation couldn’t be completed. (Cocoa error 134130.)" UserInfo=0x1e59d0d0 {URL=/iPhone%20Simulator/6.1/Applications/2C2E0482-7F42-4574-B998-A9FB5479F4B1/Library/Application%20Support/Cookies.sqlite, metadata={
    NSPersistenceFrameworkVersion = 419;
    NSStoreModelVersionHashes =     {
        Cookie = <3c2e440d 9fb3ea81 60146cf8 2bcb8ffe 10b2df20 0d907eea 018c6ade eeefb9c7>;
        UserDictionaryEntry = <f0c9025b 602122f9 37a4e274 bdaacec1 b9a66f83 fca5c43b bed5e80a 6baee338>;
    };
    NSStoreModelVersionHashesVersion = 3;
    NSStoreModelVersionIdentifiers =     (
        ""
    );
    NSStoreType = SQLite;
    NSStoreUUID = "0F344BFF-833C-4009-9867-13973A5291F1";
    "_NSAutoVacuumLevel" = 2;
}, reason=Can't find model for source store}, {
    URL = "file:///iPhone%20Simulator/6.1/Applications/2C2E0482-7F42-4574-B998-A9FB5479F4B1/Library/Application%20Support/Cookies.sqlite";
    metadata =     {
        NSPersistenceFrameworkVersion = 419;
        NSStoreModelVersionHashes =         {
            Cookie = <3c2e440d 9fb3ea81 60146cf8 2bcb8ffe 10b2df20 0d907eea 018c6ade eeefb9c7>;
            UserDictionaryEntry = <f0c9025b 602122f9 37a4e274 bdaacec1 b9a66f83 fca5c43b bed5e80a 6baee338>;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "0F344BFF-833C-4009-9867-13973A5291F1";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "Can't find model for source store";
}

当我尝试调用此行时会发生这种情况:

[[WLClient sharedInstance] wlConnectWithDelegate:connectListener];

它工作正常,我能够毫无问题地连接到我的 Worklight 服务器,但现在它一直抛出此错误。我所做的唯一更改是尝试从应用程序中显示一个对话框。还原此更改后,我仍然收到错误消息。

4

2 回答 2

1

当您的应用程序包中未内置所有所需文件时,就会发生这种情况。在您的应用程序的构建目标中,确保属于 Worklight 本机 SDK 的所有(非源)文件都出现在“复制文件”部分中。这是文档的链接

于 2013-02-18T19:38:44.430 回答
0

您是否在 Web 应用程序中更改了应用程序现在尝试保存 cookie 的内容?或者让一个传给它。看起来 WL 正在尝试存储 cookie,但进展不顺利。您可以隔离触发此事件的应用程序部分吗?是否编译。看看这段代码可能是如何被使用的:

http://mobile.tutsplus.com/tutorials/iphone/core-data_schema-versioning-and-lightweight-migrations/ http://46424.com/question/133999#.USJnGVprP4Y

于 2013-02-18T17:42:15.717 回答