AppIntent - Widget & ControlWidget

Hey all, iOS 18 - RC I have an app that supports both Widgets and ControlWidget, which resides on the same AppIntent. The following sync works fine when any action is taken on any of the three players -

  • App - Widget - both directions - works as expected
  • App - Control Widget - both directions - works as expected

However - Widget - ControlWidget - the UI not always sync in real time (the values are ok) So if for instance I increase a counter on the widget from 1 to 2, the comtrolwidget will still show 1, but if I tap it, it will increase to 3.

For any update/action taken on the AppInten, I call -

            WidgetCenter.shared.reloadAllTimelines()
            ControlCenter.shared.reloadAllControls()

Any idea how to ensure this sync?

Thanks a lot! Dudi

Hi Dudi,

Based on my own testing, I'm not sure if you can reload all controls from inside an AppIntent that is running outside of the App's execution scope. It seems like you can only get a definite reload if you call that from your running app.

It would help to know where you are storing your counter value, as that could also affect this.

AppIntent - Widget & ControlWidget
 
 
Q