1
使用Restkit,我想重試一個失敗的請求。我試圖從委託方法做到這一點,如下所示:Restkit:重試失敗的請求
-(void)request:(RKRequest *)request didFailLoadWithError:(NSError *)error{
NSLog(error.domain);
NSLog([NSString stringWithFormat:@"%d",error.code]);
NSLog(error.localizedDescription);
NSLog(error.localizedFailureReason);
[request cancel];
[request reset];
[request send];
}
不過,我得到以下錯誤:
2013-01-14 11:19:29.423 Mobile_ACPL[7893:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to add the same request multiple times'
我怎樣才能做到這一點?
工作。再次感謝! –
注意'dispatch_get_current_queue()'從iOS 6.0開始已被棄用 – magma