I am downloading hundreds of files with NSURLSessionConfiguration
. I am updating a progress label for each downloaded file, from method
-(void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location.
Suddenly it stopped updating progress label. I have tried performSelectorOnMainThread
,dispatch_async(dispatch_get_main_queue()
but to no avail.
What could be wrong? How can I update UI from didFinishDownloadingToURL method?
Any help would be appreciated. Thanks