WatchOS 9 complications with WidgetKit - daily limit.

I am working on an indipendant WatchOS application which received messages from APNS push notifications. There are three kind of messages and each one has it's own widget which represent the current state of the message category.

With WatchOS 9, my ClockKit complications are deprecated and I have to migrate to WidgetKit. I did that, but I am having problems with updating the widgets on time. It seems like I am exceeding the widget's daily limit or somehow the OS throttle the updates (they are not instant after the third update in 2 minutes).

The main app and the widget extension targets share the data using CoreData. I need to update the widgets every time the database changes. I am currently using WidgetCenter.shared.reloadTimelines(ofKind: ***). I am calling this function when the app is in foreground and thought that the limit should not be a problem, but it looks like it does.

Did someone manage to achieve this kind of widgets update?

I have the same problem reloading the widget timelines when the app is in the foreground. When the widgets are reloaded from the foreground without much time in between reloads, the widgets don't get updated. This is undescribed by the documentation and a big problem for my app.

Has anyone figured out how to always update widgets at the correct time from the foreground?

Just migrated ClockKit complications to WidgetKit complications, and have a similar issue. Though in my case widgets won't update at all if the watch app is not in the foreground. Sometimes widgets update after opening and closing the watch app, but usually, I need to switch to a different watch face to force them to update 😕 Any ideas? I use WidgetCenter.shared.reloadAllTimelines() method on the watch app to trigger the reload.

P.S. See full question here: https://developer.apple.com/forums/thread/735352

WatchOS 9 complications with WidgetKit - daily limit.
 
 
Q