Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSBundleResourceRequest beginAccessingResources never completes

I am trying to utilize ODR in my application, but the beginAccessingResources never completes. Below is a simplified version of my code:

let bundleResourceRequest = NSBundleResourceRequest(tags: tags)

bundleResourceRequest.beginAccessingResources { error in

    DispatchQueue.main.async {
        if let error = error {
            bundleResourceRequest.endAccessingResources()

            // Handle error

        } else {
            // Successful
        }
    }
}

I have started simple by tagging a .sks file with the tag Level1 and another .sks with the tag Home. When I begin access resources for the tag Home, I get a successful completion with no problem. However, when I try with the Level1 tag, the completion block never fires. I don't receive an error or success. When I look in Disk Report, it shows Home is In Use and Level1 is Downloading with a progress bar that never moves. Level1 is a total of 16 KB so it isn't too large, and I have let it sit for ~10 minutes with no success.

What could be causing this function to never complete?

like image 776
smandrus Avatar asked Oct 28 '25 17:10

smandrus


1 Answers

I was able to fix this by going to Build Settings and changing Embed Asset Packs in Product Bundle to Yes for Debug.

like image 118
smandrus Avatar answered Oct 31 '25 08:10

smandrus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!