-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TopShelf example not working since tvOS 13.4 #4
Comments
This returns a URL like |
Oof--thanks, @tmm1. I'll see if there's any workarounds, but I'll likely have to |
Yea, real bummer. I just opened a radar too, for reference:
|
If any Apple 👀 are watching, I filed two radars: FB8122798 and FB8122874. |
You only have a nano second to provide the TVTopShelfSectionedContent. It's not possible to issue even the simplest http request, or generate a thumbnail using UIGraphicsImageRenderer etc. All that work has to be done by the app, (in a BGAppRefreshTask probably) and the resulting data (thumbnails etc...) saved in a group folder. Then it's fine to just use the file url. |
Not sure I follow. I'm making HTTP requests and it works just fine. The new TVService api in 13.0 uses a completion handler to make this even easier. Apple's own BuildingAFullScreenTopShelfExtension example uses dispatch queue to calculate the top shelf contents, and even mentions a network request in the code comments. I also tried already to cache the generated files and even when they're ready on disk and returned right away, it never renders inside the Top Shelf.
Maybe this is the key.. what do you mean by group folder? |
Okay I can confirm this works. See https://developer.apple.com/forums/thread/23418
The new path with proper permissions to render inside Top Shelf looks like |
Awesome--I'll be unavailable for most of the weekend but I'll experiment and correct the example code as soon as I can. |
Like you at first I was happy to see the completion handler. But I couldn't get any http request to complete (It does work in the Simulator though). Maybe they have fixed it in more recent version of iOS 13.
It's bizarre the extension wouldn't have read access to its own Cache folder. |
In tvOS 13.4+ and 14.0 Beta, there are much stricter memory limits on top shelf extensions. The example seems to use a lot of memory and gets killed, but that can be fixed as so:
However, it seems that now disk based urls cannot be used for images in the top shelf. The image is never rendered on screen:
The text was updated successfully, but these errors were encountered: