how can I trigger force updates without an external SDK?

Asked on 08/07/2024

1 search

To trigger force updates without an external SDK, you can use the tools available for widgets and live activities. Specifically, your app can ask the system to reload your control. Here are the steps you can follow:

  1. Enable WidgetKit Developer Mode: This can be done in the developer settings to remove system policies from your control, allowing for more frequent state refreshes during development.

  2. Request a Reload: Your app can request the system to reload your control on demand. This is similar to how widgets and live activities are refreshed.

  3. Use Control Value Providers: If your control reflects state from a server, you can fetch the state asynchronously using a value provider. This ensures that your control's state is always up to date.

For more detailed information, you can refer to the session Extend your app’s controls across the system (09:01).

Relevant Sessions