我正在尝试在我的应用程序中使用 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 对象,因为每个场所都需要联系人详细信息。如果错误消息不够,我将添加一些代码和更多详细信息。