WidgetCenter.shared.reloadAllTimelines() only works when app is in the foreground

Hi y'all, I'm trying to create an Intent Extension that updates a widget, but I can't get the widget to update unless the app is in the foreground. Right now I'm using .continueInApp, but that's not such a great UX...

Has anyone experienced this? I've submitted it as FB7845957
Hi there, I can confirm this.
In my case, calling WidgetCenter.shared.reloadAllTimelines() from the intent extension updates the widget fine when running the main app target from Xcode. Once Xcode is stopped, the intent can update the widget once or twice, and then stops working.
I have the same problem. I have tried using a silent push notification, that way the app does get woken up in the background and I tried calling the WidgetCenter.shared.reloadTimelines method right from there. The result was the same, the widget did not get updated if the application is not in the foreground.

It's sad 3 years later I face the same issue in iOS 17 - WidgetCenter.shared.reloadAllTimelines() works only on foreground (or when running the app from Xcode). Does anyone found a workaround?

Same problem on iOS 18.0.1 and Xcode 16... FB15508274

My timeline covers 10 days, but if I get new data in my background task which runs overnight, I'd like to reload the timeline.

I was able to verify that code before and after reloadAllTimelines() successfully executes in the background and all my data is updated, but widgets timelines are not ( I share a subset of my data with the Widgets using an App Group and UserDefaults).

Starting the background task in the debugger always works and updates both data and widgets.

Has anybody experimented with shorter timelines, and/or TimelineReloadPolicy.after(), or found any other workarounds yet?

WidgetCenter.shared.reloadAllTimelines() only works when app is in the foreground
 
 
Q