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.