I am pretty sure that this is the reason why my completion block is not called here:
resourceRequest = NSBundleResourceRequest(tags: Set(["preview"]))
resourceRequest?.beginAccessingResources { [weak self] downloaded in //not called
// here I do what I need with this and at the end I call
// self?.resourceRequest?.endAccessingResources()
}
I have cleaned and restarted Xcode, restarted iPhone and Macbook also. Nothing helped. How can I clear it here?
EDIT
I have printed some info of progress property:
print(resourceRequest?.progress.isCancelled) //false
print(resourceRequest?.progress.isPaused) //false
print(resourceRequest?.progress.isFinished) //false
print(resourceRequest?.progress.isIndeterminate) //false
print(resourceRequest?.progress.localizedDescription) //0% completed
print(resourceRequest?.progress.isCancellable) //true
but when I call cancel()
nothing changes...
from Why my On Demans Resource is still in Downloading... status?
No comments:
Post a Comment