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?
Asked
Active
Viewed 409 times
3
-
did you find any way to achieve it? – Manoj Jul 05 '21 at 12:27
-
I haven't found a way to hide them yet. – TALE Jul 06 '21 at 13:29
1 Answers
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