I am using RestKit in my Objective-C project and need to specify a timeout for a call to my service of around 10 seconds.
After reading around, it doesn't look like RestKit supports this, so my plan is to:
- Start a timer when my request is sent
- When the data is loaded, disable the timer
Here's my problem...
If the timer method fires, I need to cancel the request and invoke the method below manually. I'm not 100% sure how to achieve this.
There's some context in my other question, showing how RestKit is implemented in my project and what it's doing in this case.
Many thanks in advance for any help you can give me on this one.
- (void)objectLoader:(RKObjectLoader*)objectLoader didFailWithError:(NSError*)error {
NSLog(@"Hit error: %@", error);
}