I have a NewsStand app where when user taps on download button we download issue using
[nkAssetDownload downloadWithDelegate:self];
Now in between downloading suppose network disconnects, NSURLConnection calls didFailWithError:(NSError *)error method. I inform this to user with an alert and update UI so that download button get enabled. Now when user taps on "download" button, I check for
if(nkIssue.downloadingAssets.count == 1) { again start download with [nkIssue.downloadingAssets objectAtIndex:0]; } else { start download with nkAssetDownload = [nkIssue addAssetWithRequest:urlRequest]; }
I have few queries about this
1) Why I always get nkIssue.downloadingAssets.count == 0 when user taps "download" button again? Should it not be 1 the issue which should still be in iOS's download queue ?
2) After user taps "download" again, issue should continue downloading from same position right ? I am not always observing this behavior, sometime it start downloading from start (sigh).
Although if I close app, removed it from memory (double tap home button, long press app icon and delete it) and again launch I do get [nkLib downloadingAssets].count == 1 in "didFinishLaunchingWithOptions" and my issue resumes download.
Every aspect of NewsStand stuff is not clearly documented by Apple.