Post

Replies

Boosts

Views

Activity

Reply to WidgetKit - custom dynamical intent - defaults?
I have the same issue ... I've spent hours on it, tried to set the default values in different places: in the Provider struct: in func placeholder(in context: Context), let configuration = SelectDataItemIntent() configuration.dynamicParam = [DynamicParam], size depending on context.family in func getSnapshot(for configuration:  if configuration.myDynamicParam == nil { ... } in func getTimeline(for configuration: if configuration.myDynamicParam == nil { ... } That works fine for the preview and for the widget itself, but unfortunately the set parameters as not saved. Therefore the EditWidget UI shows 'select' for each parameter instead of the expected value .. not very nice ... I've also tried to initialize it in the Widget struct, but the Intent configuration requires an instance type of the Intent, not an actual instance, so it seems not possible from there... Have you find any solution ?
Oct ’20