Post

Replies

Boosts

Views

Activity

Dynamically modifying the configuration properties of a widget?
Is there any way to modify the configurationDisplayName, description, or supportedFamilies properties, or are they essentially fixed per app version in the App Store? struct MyWidget: Widget { 		var body: some WidgetConfiguration { 				StaticConfiguration(...) { ... } 				.configurationDisplayName("foo") 				.description("bar") 				.supportedFamilies([.systemSmall, .systemMedium]) 		} } Eg, say if the user reaches an "expert" level in a game, only then do I want to make the .systemLarge size available to them. In such a case, I'd like to modify the supportedFamilies property and not have them essentially fixed in the binary. In my testing, it seems that the widget body code is only ever run once.
2
0
804
Feb ’22
Dynamically modifying the configuration properties of a widget?
Is there any way to modify the configurationDisplayName, description, or supportedFamilies properties, or are they essentially fixed per app version in the App Store? struct MyWidget: Widget { 		var body: some WidgetConfiguration { 				StaticConfiguration(...) { ... } 				.configurationDisplayName("foo") 				.description("bar") 				.supportedFamilies([.systemSmall, .systemMedium]) 		} } Eg, say if the user reaches an "expert" level in a game, only then do I want to make the .systemLarge size available to them. In such a case, I'd like to modify the supportedFamilies property and not have them essentially fixed in the binary. In my testing, it seems that the widget body code is only ever run once.
Replies
2
Boosts
0
Views
804
Activity
Feb ’22