I have a button on a live activity, and I want to end the live activity and update the Control Center widgets and home screen widgets after clicking this button. So, in the perform()
method of the button's LiveActivityIntent
, I called the methods ControlCenter.shared.reloadAllControls()
and WidgetCenter.shared.reloadAllTimelines()
, but they didn't work. Home screen widgets and Control Center widgets do not refresh, resulting in a poor user experience.
After interacting with a button in the live activity, the Control widget and home screen widget did not update.
Hi,
The best first course of action here would be to use Console.app to monitor to the relevant processes related to your app and extensions.
A good way to start would be with filtering by the BundleID of the target and / or the target name itself (the process name).
Also be sure to check the system processes for additional information. This will vary based on what and where you are looking but some examples:
To debug APNS you'll want to monitor apnd
along with other relevant processes.
To debug WidgetKit, LiveActivities, Dynamic Island you'll want to monitor springboardd
, liveactivitiesd
along with other relevant processes.
You may be out of refreshes or the system may be attending to higher priority tasks. Either way, monitoring the console logs will give insight into this.
Rico
WWDR - DTS - Software Engineer