Chris Wu · @MuseumShuffle
319 followers · 620 posts · Server mastodon.social

SwiftUI widget question: In the examples I've found for making a network call from a widget they, as I would expect, do it inside a call to getTimeline. But through logging I see that getTimeline is called multiple times at the same time for a widget. It looks like it gets called for each of the supported sizes. I don't want six simultaneous network calls to pull down information I only need once. How do people get around this?

#swiftui #widgetkit #widget #gettimeline

Last updated 2 years ago