Originially I thought that if a NSURLSessionDownloadTask
finishes successfully URLSession:downloadTask:didFinishDownloadingToURL:
method will get called, if it fails for some reason - URLSession:task:didCompleteWithError:
.
It works as expected on simulator (only one of this method is called for one download task) but on device this is not the case: in case of failure both these methods are called, URLSession:downloadTask:didFinishDownloadingToURL:
being the first the one. (an both these methods pass the same task in parameters)
Is there something I am missing?