I am saving 4 different tokens on Server using Restkit Coredata. using response descriptor.
RKResponseDescriptor *tokenDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:instagramToken method:RKRequestMethodGET pathPattern:@"register/token" keyPath:@"data" statusCodes:statusCodes];
// And I'm calling it this way.
[[RKObjectManager sharedManager] getObjectsAtPath:@"register/token" parameters:params success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
} failure:^(RKObjectRequestOperation *operation, NSError *error) {
}];
it is storing very well and I can access it in coredata as well. but the problem is, If I save 1 token on server and map the response all good no issue in that. But when I save other token on Server the new response get mapped in coredata and over-right the old response. I want to keep all the responses in coredata.
Please help on this.