Relative Content

Tag Archive for swiftuiwidgetswiftdataappintents

How to configure app widget with SwiftData

I need to configure a widget by SwiftData object (in my case a TaskItem), so when the user selects a TaskItem the widget will provide him the chosen task info, to do that we need AppIntent which contains a parameter that conforms to AppEntity. I found some example code as shown bellow but it’s not for SwiftData object, I need an example code to implement widget configuration with SwiftData.