I have created an NSManagedObject via xcode Editor menu. My object only has one property "name". When I try to set the property I get "[MyObject setName:]: unrecognized selector sent to instance"
MyObject *thing = [MyObject objectFromJSONDictionary:obj];
thing.name = obj; <-- ERROR HERE
I have checked that my property "name" is the same in CD as in my class. Also my interface property is the same. And my dynamic property is the same.
@property (nonatomic, retain) NSString * name;
@dynamic name;
Any suggestions? And yes I have wiped out the CD object, cleaned my project, and created it in CD again. Same issue?
@dynamic name;
– Midhun MP@dynamic
. – Martin RobjectFromJSONDictionary
do ? The most probably reason is that it does not initialize the Core Data object properly. – Martin RNSManagedObject
must be initialized withinitWithEntity:insertIntoManagedObjectContext:
– David Berry