Documentation Spotlight: Dynamically display timely data in your widgets

With a well-planned timeline, your widget can share timely, relevant information all day long without compromising performance or battery life.

WidgetKit handles updates dynamically by distributing them over the course of a day. This budget allocation approach is flexible and adaptable — taking into account someone’s behavior, the widget’s last reload, whether the containing app is active, even how weekends and weekdays might be treated differently. Though WidgetKit doesn’t support displaying live views for real-time information, you can plan your timeline effectively and provide more frequent updates by understanding how WidgetKit plans refreshes throughout the course of a day. For example, if your widget tracks the score of a live sporting event, you can allocate your refresh budget so that your widget updates more often during the event.

Keeping a widget up to date