Can I increase the reliability of my app intent updating my widgets?

We have widgets in our app. We're now working on a Live Activitiy with a button calling an app intent. This app intent needs to update our Widgets, and we're seeing semi-great results.

When we're updating the widgets from within the app, it works great. Also from geofence triggers it usually works, so we're thinking it might have to do with the "widget update budget"? According to the docs:

Cases in which WidgetKit doesn’t count reloads against your widget’s budget include when: The widget performs an app intent, such as when the user taps a button or toggles a switch.

But we're not really seeing that. When I run our app from within Xcode, everything runs great all the time and the widget gets updated within milliseconds, but when running the TestFlight version is more spotty.

To be clear: This is a button in a live activity, calling an app intent, and in turn, the app intent is calling reloadAllTimelines for our "regular" widgets. The live activity itself always gets updated properly.

My question is basically, am I doing something wrong and can I do something to increase the consistency of the widget updating on time?

Abbreviated example:

final class UserEventIntent: NSObject, LiveActivityIntent {

@MainActor
func perform() async throws -> some IntentResult {
       
    do {
        
        let newStatus: (stat: Status, wasSame: Bool) = try await eventHelper.performEvent(status: status)
        
        WidgetCenter.shared.reloadAllTimelines()       
    }catch {
        await WidgetCenterBridge.updateLiveActivityForInProgress(false)
    }
    return .result()
}

Your widgets live on Springboard which is a process you don't control. If that process is busy or has higher priority tasks, your updates will not supersede those tasks. If there is a significant, consistent slow response, then it may be worth using Instruments -> Time Profiler to see what methods are slowing things up.

Rico

WWDR - DTS - Software Engineer

Hey thanks for responding. What's puzzling is that widgets updating from app have basically zero problems. It's only when the live activity is the one updating.

To me, it would make sense that since the docs say that button presses from widgets are not subject to the budget, neither should live activity button presses be subject to the budget restrictions for updating the widgets, but it seems not.

Is it possible to confirm that live activities ARE restricted by the update budget? In that case, I can at least know that I don't have a bug in my app.

Can I increase the reliability of my app intent updating my widgets?
 
 
Q