Posts

Post not yet marked as solved
11 Replies
5.9k Views
With regards to the new iOS 14 widgets implemented with WidgetKit: For a widget that needs to have frequent, unpredictable pushes of content, I'm curious to how often data can be pushed to the widget and how quickly the widget will reflect this updated data. Specifically, Is there a maximum number of reloads per day? Is there a throttle to how often we can reload? Is there an upper limit to the time taken between the call to reloadTimeline() and when the reload actually happens? 3a. If events are unpredictable, should we use a timeline at all? (as compared to just a single entry in the timeline at all times) Or should there just be a very finely grained timeline (eg. every minute) that simply does pull requests in the background to see if anything changes? 3b. Or should everything be based on push notifications which reloads the timeline? What if the user has disabled push notifications? For example, a news widget might want to keep the user updated of breaking news which might be relevant only for the next 10 minutes. (eg. "Soccer: Chelsea-Liverpool 3-1 upset at half time!") I am curious how the Apple stock widget is implemented as well. Does it have a 1 minute interval timeline, and each entry attempts to update the content via a background network request? As WidgetKit is really new to us, I would appreciate any guidance from Apple regarding the best technical designs and practices in this area. Thanks so much!
Posted
by hokkaido.
Last updated
.
Post not yet marked as solved
0 Replies
275 Views
When we request a new timeline in WidgetKit (via a timeline refresh policy or WidgetCenter.shared.reloadTimelines), is there a maximum time limit after the desired time to which the new timeline will be guaranteed to be fetched by the OS? eg. If it's 2pm now, and I schedule a timeline refresh for 3pm (ie. Refresh = .after 1hr), is there a hard cap to the latest time the timeline will be refreshed? (ie. Is there a time guarantee that for example, the new timeline will be requested by at most 15 min after the desired time? 4hrs? 24 hours?) This is very important as some apps need to provide a certain Service Level Agreement to our users.
Posted
by hokkaido.
Last updated
.