Pass data from app to widget intents

Hi, Is it possible to pass data to intents from the app? I want to display a list of locations that the user selected inside the app. Similar feature is implemented in widget for Apple Weather app.

Thank you.
Yes, you can pass data from app to widgets, as long as they are in the same app group.
Thank you for your response. But that's not my issue. I would like to create a location search with pinned locations or list of locations for the widget configuration. Fe. User can select favourite locations, and these locations will be displayed inside the widget configuration.

Let's check Apple weather app. You can add favourite locations to your weather app. Then you can display weather for current location, or you can select from favourite locations. Apple Weather Widget -> Edit Widget -> Location -> Your location table Thats the feature.

I know how to create custom intent with static enum cases or how to create a string field that supports multiple values, but I don't know how to fill custom intent parameters from the app.




I was looking for IntentHandler
Pass data from app to widget intents
 
 
Q