Hello! I’m a new-ish iOS developer tasked with adding a widget to an existing codebase (which happens to be all UIKit), and this tutorial has been enormously helpful – thank you for providing such clear explanations! I just navigated through the whole tutorial, and one thing I’m not clear on is whether the app needs to continuously run in the background in order to refresh the widget. Can Emitron still provide its widget with data when closed because it caches it locally? Or is a widget somehow able to force the app to make an API call even when it’s not open?
In our app, the in-app content that will also be presented in the widget is currently only fetched on inital app load (though I’m planning to add a periodic background refresh to this, for users who – unlike me – don’t force-close their apps when not in use). The json feed I’m hitting only updates once a day, and I think many of our users currently interact with the app less than that. If the widget can’t force the API call in the app to occur, it seems like I ought to put a separate API call into the widget itself and then pass the data to the app.
Thank you in advance for any clarification, and I’d appreciate any suggestions you might have on where else to look for information that I might have missed!