I work with core data and I try to assign an int value (id) from WS to core data attribute (Integer 32) . The attribute is an NSNumber and when I code it :
NSNumber *v = [responseMembers valueForKey:@"id"];
newMember.idMember = v;
And, this error appears :
2013-06-17 11:08:24.407 EPNet[2190:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unacceptable
type of value for attribute: property = "idMember"; desired type = NSNumber; given type = __NSArrayI; value = ( 1, 2, 3, 4, 10, 14, 17, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20 ).'
Can you help me please ?
idMember
. – BhavinresponseMembers
? – Bhavin