I am downloading audio files through ASIHTTP Request. when I downloads three or less number of files in parallel, its work fine, but when I try to download more fourth file in parallel, it’s show an activity indicator on all of the tableViews in the project and do not show the table data?
Here is my code
UIProgressView *_progressBar = [[UIProgressView alloc] init];
ASIHTTPRequest *request;
request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:trimmedString]];
[request setDelegate:self];
[request setDownloadDestinationPath:filePath];
[request setDownloadProgressDelegate:_progressBar];
[request setShowAccurateProgress:YES];
[request setShouldContinueWhenAppEntersBackground:YES];
[request setDidFinishSelector:@selector(downloadedSuccessfully:)];
[request setDidFailSelector:@selector(downloadedFailure:)];
[request startAsynchronous];
I am not so experience in Iphone Development, so feel free to help.
Thanks in advance.
I guess it would be better to use
ASINetworkQueueand performASIHTTPRequestby adding it as an operation to the queue.ASINetworkQueue(asNSOperationQueue) has maxConcurrentOperationCount property. I use more than 5 concurrent operations and they run really simultaneously.