I have everything associate with on-demand resources working correctly in my application with the exception of the ability to cancel, pause or resume downloading ODR content. Using Xcode 9.4.1 with iOS 11.4 target, the cancel, pause, etc. IBAction is called when a tap occurs, but the progress bar continues unabated. The ODR progress observer completes too. I've seen code like this:
class ODRManager {
var myCollectionRequest: NSBundleResourceRequest?
@IBAction func cancelLoadingOnDemandResource(_ sender: UIButton) {
guard let myCurrentRequest = myCollectionRequest else { return }
myCurrentRequest.progress.cancel()
}
}
But such code doesn't cancel/pause the NSBundleResourceRequest. I found a radar report dated Jan. 12, 2016 indicating the same problem. Is it possible to cancel, pause or resume a NSBundleResourceRequest download? If so, how is it done?
Thank you.