I use an RKObjectManager to load objects from a remote resource, and, use a tableView to display the fetched objects. When my tableView model is deallocated I cancel all current requests with
[self.objectManager cancelAllObjectRequestOperationsWithMethod:RKRequestMethodGET matchingPathPattern:self.resourcePath];
When the user reloads the view, a new model is created - Instead of creating the objectManager from scratch, I fetch the same one (I store the objectManager instance elsewhere). I'm trying to use a single object manager across the app for the same service/site - not sure if we can use multiple object managers against the same persistent object store? However, now all requests to the resource path fails with the following error.
restkit.network:RKObjectRequestOperation.m:569 Object request failed: Underlying HTTP request operation failed with error: Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)"
It looks like once I cancel against a resource path on an objectManager, I can't reload that resource via a fresh request at a later point in time. What would the best practice be to cancel current requests and reload later? In the earlier delegates version of restkit, my app would crash if I didn't remove my model/view as delegate from the object manager. I'm thinking I should still cancel my requests to avoid such issues even with the new blocks way of operation? Pointers/advice much appreciated. Thanks
Regards
George M.P.