0

With iOS 14 and the new widgets you can either have a StaticConfiguration or an IntentConfiguration where you define a custom intent. I have created a simple Intent in the intent configuration file called "MySimpleIntent". Code is generated by Xcode.

I went on and created an Intent Extension in order to provide a dynamic list of options (when editing the widget). Usually the list is always the same with all widgets, however I specifically need to filter the list of results based on the widget family.

Do you know how I can retrieve the widget family from an Intent / Intent Configuration? I get can all current widgets using the WidgetCenter.shared.getConfigurations, however I can't properly filter them by intent identifier.

Any help is appreciated!

Janosch Hübner
  • 1,584
  • 25
  • 44

1 Answers1

1

I haven't tested it, but on top of my head I guess you can just create a different Intent for the list that you need filtered and add another func getTimeline using that IntentConfiguration on the same widget

Ludyem
  • 1,709
  • 1
  • 18
  • 33