My widget needs to get that from an API to generate its timeline.
In the 3rd video of the Widget Code-Along the presenter says that the in-process foreground URLSessions should work as expected.
My widget gets stuck at placeholder view and never shows the real data.
Everything works fine and the widget renders as expected when I use some dummy data to generate the timeline.
Anybody, any success with fetching data from the Internet in a widget?
In the 3rd video of the Widget Code-Along the presenter says that the in-process foreground URLSessions should work as expected.
My widget gets stuck at placeholder view and never shows the real data.
Everything works fine and the widget renders as expected when I use some dummy data to generate the timeline.
Anybody, any success with fetching data from the Internet in a widget?
Answering my own question: This works just fine. Here is a great tutorial on how to use URLSessions in widgets. (tl;dr: no special considerations necessary) (This does not allow me to link the URL but search for Oliver Binns WidgetKit)
In my case the problem was because with data from the network, my widget was running against the 30MB memory limit.
In my case the problem was because with data from the network, my widget was running against the 30MB memory limit.