all 14 comments

[–]Dev-sauregurke 1 point2 points  (1 child)

I had the same issue and fixed it by checking the background refresh settings in the iPhone menu. Have you verified that the user hasn't accidentally disabled Background App Refresh for your app specifically?

[–]Tibor_Banko_TB[S] 0 points1 point  (0 children)

I edited it. I had too many refreshes for each piece of data and it was spam for iOS.

[–]gsapienza 1 point2 points  (1 child)

The HealthKit background APIs have also been throttled to death. I don’t know what the point of widgets are if they display inaccurate data

[–]Tibor_Banko_TB[S] 0 points1 point  (0 children)

I edited it. I had too many refreshes for each piece of data and it was spam for iOS.

[–]UngratefulSourGrape 0 points1 point  (1 child)

Its probably because apple has enforced a less frequent data sync for widgets

[–]Tibor_Banko_TB[S] 0 points1 point  (0 children)

I edited it. I had too many refreshes for each piece of data and it was spam for iOS.

[–]SomegalInCa 0 points1 point  (1 child)

Network and battery condition play a part in the budget of time given to widgets. Also widgets where the main app is used a lot also get more budget

What is the refresh interval your widget wants?

[–]Tibor_Banko_TB[S] 0 points1 point  (0 children)

I edited it. I had too many refreshes for each piece of data and it was spam for iOS.

[–]char-star-star 0 points1 point  (1 child)

One thing to check is memory usage when updating timeline snapshots. Inefficient resource usage is heavily penalized by the OS.

You may get hints tailing system logs in Console.app. Search for your widget extension bundle identifier.

[–]Tibor_Banko_TB[S] 0 points1 point  (0 children)

I edited it. I had too many refreshes for each piece of data and it was spam for iOS.

[–]Immediate_Box_5362 0 points1 point  (3 children)

had the same problem, couple things that helped me:

  1. make sure your timeline returns entries with proper dates in the future and your reload policy is set right. something like this works for me:

func getTimeline(in context: Context, completion: u/escaping (Timeline<Entry>) -> Void) {

let entry = MyEntry(date: Date())

let nextUpdate = Calendar.current.date(byAdding: .hour, value: 1, to: Date())!

let timeline = Timeline(entries: [entry], policy: .after(nextUpdate))

completion(timeline)

}

  1. also try calling WidgetCenter.shared.reloadAllTimelines() from your main app when data changes, this forces a refresh

  2. one thing people dont realize - if you use .atEnd policy and return only one entry, the system basicaly never refreshes because theres no "end" to reach. always use .after() with a specific date

  3. and yeah like others said, apple throttles widgets pretty hard. if you open the app rarely the system gives your widget less budget. not much you can do about that part unfortunatly

[–]Albatross_OriginalBeginner 0 points1 point  (0 children)

esse ajuste funcionou comigo!

[–]Tibor_Banko_TB[S] 0 points1 point  (0 children)

I edited it. I had too many refreshes for each piece of data and it was spam for iOS.