You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hitting this problem. My app is crashing in this code in SDScaffoldAddViewController.m
//Get Attribute Types from Entity
for (NSPropertyDescription *property in _entityDescription) {
[_attributeTypes addObject:[property valueForKey:@"attributeType"]];
}
The issue is that property could point to NSAttributeDescription or NSRelationshipDescription. As long as property points to NSAttributeDescription everything works great. When property points to NSRelationshipDescription the app crashes due to the uncaught exception: NSUnknownKeyException as shown below.
2013-04-21 18:33:11.859 SCScaffoldSyncTest[1807:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSRelationshipDescription 0x7caca50> valueForUndefinedKey:]: this class is not key value coding-compliant for the key attributeType.'
I could resolve this crash by first checking whether property points to NSAttributeDescription before calling valueForKey, but I doubt that would be the correct fix.
Could you explain what would be involved in implementing the correct fix?
Add Support for related objects in new views
The text was updated successfully, but these errors were encountered: