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

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -