Do watchOS widget reloads in an active workout session count against the daily budget?

https://developer.apple.com/documentation/widgetkit/keeping-a-widget-up-to-date lists a number of exception including "The widget’s containing app has an active audio or navigation session."

https://developer.apple.com/videos/play/wwdc2021/10048/ mentions: "However, there are a few situational exceptions that will make these reloads occur both immediately and budget-free. These are when your container app is foreground to the user or when your app is participating in a user session, like Navigation or Now Playing audio."

Does an active workout session in a watchOS app count as "your app is participating in a user session", so calls to WidgetCenter.shared.reloadTimelines(ofKind:) are budget-free?

Thanks for the post, I’m not an expert in watchOS, but I’m relative familiar with in Live Activity and Widgets. However, waiting for a confirmation from a watchOS engineer on this.

On watchOS, starting an HKWorkoutSession elevates your app's lifecycle state. The system considers your app to be actively in use by the user equivalent to being in the foreground, or having an active audio/navigation session.

Looking at the documentation and trying to make sense of it, because the system recognizes the user is actively engaged in the workout, WidgetKit suspends the standard daily reload budget to allowed unlimited complication updates during an active workout.

The budget exception only applies while the HKWorkoutSession is in the .running state. If the workout is paused, ended, or suspended, your app loses this elevated privilege and any subsequent calls to reloadTimelines will immediately start counting against your standard daily budget.

Again, inviting watchOS experts here to jump in the thread to verify the information.

Albert Pascual
  Worldwide Developer Relations.

Does an active workout session in a watchOS app count as "your app is participating in a user session", so calls to WidgetCenter.shared.reloadTimelines(ofKind:) are budget-free?

Yes, in the case where a watchOS app calls the WidgetKit API to update its widget by reloading the timeline while running an active workout in the background, the update is budget free for the widget.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Do watchOS widget reloads in an active workout session count against the daily budget?
 
 
Q