1

I am working with RestKit-0.20.3 and faced a problem I have a Student table in database. For getting student history perform get api call, url like this https://xyz.com/api/getStudentHistory?x=a&y=b&z=c with some parameter. Using this method

 [[RKObjectManager sharedManager] getObjectsAtPath:path parameters:param success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult)

In 'path' parameter passing- path = https://xyz.com/api/getStudentHistory

I got this error when server send response.

CoreData: error: Failed to call designated initializer on NSManagedObject class ’Student’ 

After that I am getting this message and application become crash.

Uncaught exception [<Student 0xd36b3e0> valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key "notes".
     Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Student 0xd36b3e0> valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key "notes".'
3

1 Answer 1

1

After R&D and spending a lot of time got a clue from here The entity (null) is not key value coding-compliant for the key "title"

Simply replace my path parameter from path = https://xyz.com/api/getStudentHistory to path = /api/getStudentHistory in method

[[RKObjectManager sharedManager] getObjectsAtPath:path parameters:param success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult)

Now my problem solved……:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.