IOS restkit error
- by user1302602
I am sending a Post with object loader and getting this error in output window.
FYI, My didFailWithError: delegate never got hit. Not sure why.
`objectLoader:didFailWithError:]:` unrecognized selector `sent to class 0x123608`
How did i find out what is 0x123608?
I set the router in AppDelegate class and Mapping in AppDelegate too.
here is a method in my class which inherit RKObjectLoaderDelegate.
I am using shared singleton.
[[RKObjectManager sharedManager] postObject:review usingBlock:^(RKObjectLoader *loader){
// loader.params=params,
loader.objectMapping = [[RKObjectManager sharedManager].mappingProvider objectMappingForClass:[myclass class]];
loader.serializationMIMEType = RKMIMETypeJSON; // We want to send this request as JSON
loader.method = RKRequestMethodPOST;
loader.serializationMapping = [RKObjectMapping serializationMappingUsingBlock:^(RKObjectMapping* mapping) {
[mapping mapAttributes:@"field1", @"field2",@"field3",nil];
}];
loader.targetObject = nil;
loader.delegate = self;
}];
}