ios - Resume data is always nil when invoking cancelByProducingResumeData: -


When I end the application, trying to access the resumeData of the downloading file I am I tried to call the method in willEnterBackground and willpower in the appDelegate .

I resume value from view class , but the problem is that when this method is implemented, then download session will automatically close it happens.

When canceling , resuming data: , it is again The data will start and then it will call URLSessionTask-didCompleteWithError . There we found out how the app is stopped or not, and we can store resumeData without canceling the download.

This can start again later when the app launches as the following:

  self.downloadTask = [self.session downloadTaskWithResumeData: objFile resumeData]; [Self. Download Task Resume]; // Here objFile is a stored object in a core data    

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -