I am start to use ODR in my application.
The code is fine for normal case except the following scenario:
When the download process is break (press Home key),
NSBundleResourceRequest.beginAccessingResources
becomes never complete in second time.
In debug, Disk usage: the App is hold in Downloading
state.
Here is my code:
[bundleResourceRequest conditionallyBeginAccessingResourcesWithCompletionHandler:^(BOOL resourcesAvailable) {
if(resourcesAvailable == YES) {
NSLog(@"<!> Resource is available.");
} else {
NSLog(@"<!> Resource is NOT available.");
[bundleResourceRequest beginAccessingResourcesWithCompletionHandler:^(NSError * __nullable error) {
// This part of code is never reach agin if download progress is break…….
}];
}
}];
The documentation is so simple but couldn't find any help regarding this issue.
Would anyone help me? Thanks.