尝试使用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服务器,但现在它不断抛出此错误。我做的唯一改变是尝试从应用程序中显示一个对话框。恢复此更改后,我仍然收到错误。
答案 0 :(得分:1)
如果所需的所有文件都没有内置到您的应用包中,就会发生这种情况。在应用程序的构建目标中,确保属于worklight本机SDK的所有(非源)文件都显示在“复制文件”部分中。 这是link to the docs
答案 1 :(得分:0)
您是否在网络应用中更改了应用程序正在尝试保存Cookie的内容?或者让一个传递给它。看起来WL似乎正在尝试存储一个cookie,但这并不顺利。你可以隔离应用程序触发的部分吗?它编译吗?看看这段代码可能是如何使用的:
http://mobile.tutsplus.com/tutorials/iphone/core-data_schema-versioning-and-lightweight-migrations/ http://46424.com/question/133999#.USJnGVprP4Y