2

I'm developing a Newsstand app and using NKAssetDownload to download pdf's.

The problem is, whenever I press the stop button on Xcode or force close by killing it when downloading, NKAssetDownload stops responding. Only when download is in progress that NKAssetDownload stop's responding. I have to delete the app or reset simulator to get it working again.

From what i've read, the only way to clear the download is to remove the issue's NKIssue.So I removed the issue at the start of the app in viewDidLoad.

    //delete a pending download issue            
NKIssue *issue = [[NKLibrary sharedLibrary] issueWithName:[defaults objectForKey:  [NSString stringWithFormat:@"%d.Name",[defaults integerForKey:@"currentDownloadingIssue"]]]];

    // NSLog(@"%@",[defaults objectForKey:[NSString stringWithFormat:@"%d.Name",[defaults integerForKey:@"currentDownloadingIssue"]]]);

   if (issue) {
        [[NKLibrary sharedLibrary] removeIssue:issue];
         NSLog(@"Issue %i removed",[defaults integerForKey:@"currentDownloadingIssue"]);
   }

After that I add/refresh back the deleted issue when a user press the download button.

Download does not respond/show/move...

If I completed a download then the next download starts fine. Provided I did not force close during download is in progress.

Klipnov
  • 105
  • 1
  • 9
  • okay here what i've done. I did not remove the issues and just try to redownload the magazine. It just hangs there but then after 3-5 minutes the download starts. Does anybody know why? – Klipnov Oct 10 '12 at 08:59
  • I have the same problem. When I terminate the app or send it into the background the NKAsset download pauses. It restarts when the app comes into the foreground. – Phil John Oct 23 '12 at 14:18

0 Answers0