Removing a widget from project

This thread has been locked. Questions are automatically locked after two months of inactivity, or sooner if deemed necessary by a moderator.
Hi,
Is there anyway to remove (delete) a widget from a project? We would like to do so, so we can release an app without a widget until the GM version comes out.

Thanks,
Dan Uff
Up vote post of CPSoftware
270 views

Replies

If you set the supportedFamilies modifier on the WidgetConfiguration to [] then the widget no longer shows in the widget gallery. That might be an option.

e.g.

Code Block swift
public var body: some WidgetConfiguration {
    StaticConfiguration(
      kind: kind,
      provider: Provider()
    ) { entry in
      widget_mainEntryView(entry: entry)
    }
    .configurationDisplayName("Foo")
    .description("Foo")
    .supportedFamilies([])
  }


Thank you.