3

I have developed an iOS 14 desktop widget for an application and I would like to only make it available to some users. Is there a way to disable widgets the first time your application runs so that you can hide it from some of your users?

TALE
  • 960
  • 13
  • 22

1 Answers1

0

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.

public var body: some WidgetConfiguration {

IntentConfiguration(
  kind: kind,
  intent: ConfigurationIntent.self, 
  provider: Provider()
) { entry in
  widget_mainEntryView(entry: entry)
}
.configurationDisplayName("Widget")
.description("Widget")
.supportedFamilies([])
}
Lokesh
  • 357
  • 5
  • 14