【发布时间】:2012-04-07 21:57:17
【问题描述】:
我正在尝试在我的应用程序中使用 Coredata 保存我的对象,但我遇到了崩溃和这个非常令人困惑的错误:
Unresolved error Error Domain=NSCocoaErrorDomain Code=1570 "The operation couldn’t be completed. (Cocoa error 1570.)" UserInfo=0x2f8820 {NSValidationErrorObject=<ContactInfo: 0xf081140> (entity: ContactInfo; id: 0x20c0f0 <x-coredata:///ContactInfo/tDCD050E6-3BA3-47D2-A5ED-A22D53749E4B7> ; data: {
addressLine1 = nil;
addressLine2 = nil;
email = nil;
mobileNo = nil;
name = nil;
phoneNo = nil;
stateCounty = nil;
townCity = nil;
venue = nil;
zipIp = nil;
}), NSValidationErrorKey=name, NSLocalizedDescription=The operation couldn’t be completed. (Cocoa error 1570.)}, {
NSLocalizedDescription = "The operation couldn\U2019t be completed. (Cocoa error 1570.)";
NSValidationErrorKey = name;
NSValidationErrorObject = "<ContactInfo: 0xf081140> (entity: ContactInfo; id: 0x20c0f0 <x-coredata:///ContactInfo/tDCD050E6-3BA3-47D2-A5ED-A22D53749E4B7> ; data: {\n addressLine1 = nil;\n addressLine2 = nil;\n email = nil;\n mobileNo = nil;\n name = nil;\n phoneNo = nil;\n stateCounty = nil;\n townCity = nil;\n venue = nil;\n zipIp = nil;\n})";
}
ContactInfo 是我的核心数据模型中的一个实体,我有另一个名为 VenueInfo 的实体,每个对象都有一个 ContactInfo 对象,因为每个场所都需要联系人详细信息。如果错误信息不够,我会添加一些代码和更多细节。
【问题讨论】:
-
显示一些代码.. 乐于助人.. :-)) 你之前关于一对一关系的问题解决了吗?
-
最初查看错误时,我不认为它是相关的,这让我很困惑,直到像往常一样,我发现问题,感谢您引导我朝着正确的方向前进。
标签: iphone objective-c cocoa-touch ipad core-data