ios - Resume download after app has been quit -
i wondering whether possible resume download after app has been terminated user or os.
i can see sktdownloadmanager has methods pause , resume download. however, these methods work current sktdownloadobjecthelpers. if pull them out of sktdownloadmanager.storeddownloadobjects() after app has been quit , started again , throw them @ sktdownloadmanager.sharedinstance().resumedownloadfordownloadhelper() manager won't resume downloads.
i dug little deeper code , these downloads not getting restarted because of lack of proper status. sktgroupeddownloadoperation.m:87:
if (self.currentrunninggroupedoperation.statedownloaditem >= sktmapdownloaditemstatusdownloading) { return no; //cannot start download,isntall, finsihed } so, questions whether possible resume downloads after app has been terminated , if how do it. appreciated :)
for resuming download, should trigger event in application:didfinishlaunching or after application restarted:
[[skdownloadmanager sharedinstance] tryrestartdownloadswithdelegate:self anddatasource:self];
Comments
Post a Comment