Has anyone experienced this? I've submitted it as FB7845957
Has anyone experienced this? I've submitted it as FB7845957
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?
Same happening here when I try to update widgets from push notification, I execute 2 actions given a push notification.
1 - Log that the method was triggered
2 - WidgetCenter.shared.reloadAllTimelines()
All works well while Xcode debugger is attached, then it stops after the app is running without xcode, but I see that the block of code was executed because the log is created.
Any idea what I may be doing wrong? Or is this a known issue?
I work on a smart home platform app, while my widgets can't update in realtime, Apple Home widgets update as often as needed, so it's quite unfair to compete with that.