Is it possible to uniquely Identify a widget during timeline creation?

Hello, With the advent of widget interactivity, in order to support state management, I'd like to differentiate one widget from another, even if they share the same configuration.

Is this possible? Many of my search results are turning up iOS 15 era information, and I am not sure if that's still valid.

Thank you

Replies

There is no way to do that by design. If a user has multiple copies of a widget with matching configurations, I think Apple uses the same timeline to feed those multiple widgets.

  • That may actually be enough for me…

    I bet I can use a combination of Widget Family, and my configuration fields to make a UUID for that timeline category.

    That could let me persist some info in user defaults Or /tmp.

    I’m leaning toward /tmp because I’ll never know when the Widget is removed and I don’t want that data sticking around forever.

Add a Comment