Here is a bug in tvOS (possibly in iOS too) that can affect you if you work on On-Demand Resources on tvOS app.
Recently I’ve been working on On-Demand Resources for my tvOS app. Nothing fancy, just want to get a video file through ODR and play it.
Found this bug where the downloaded ODR asset will magically disappear after you present or dismiss a view controller.
It goes like this:
- Create a NSBundleResourceRequest like
NSBundleResourceRequest.init(tags: [“tag name”])
- Asset is ready for use, hooray!
dismissViewControllerAnimatedis called, the downloaded asset will become unavailable, i.e.
Work-around? Avoid presenting/dismissing view controller as long as you still need the ODR asset.
Ticket #26892545 raised in Apple Bug Reporter (a.k.a. Radar).