iOS NSURLSession, how to retry in didCompleteWithError
问题 I want to try a post call on my server till it success, I would like to try it each 30 seconds. So I am using NSURLSession for my call: NSURLSessionDownloadTask *task = [self.session downloadTaskWithRequest:request]; task.taskDescription = [NSString stringWithFormat:@"Downloading file %@", [path lastPathComponent]]; [task resume]; Then if an error occur (no network for example) I have an error in: -(void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError: