WidgetBundle improvements in iOS 16.1source • twitter.com
Luca Bernardi, who is part of the SwiftUI team at Apple:
Starting in iOS 16.1 (beta 2), WidgetBundle supports having if statement with
#availableclause (and only this specific clause) in its body.
That’s pretty useful to add more widget configurations that are supported only in later OSes like ActivityConfiguration.
This is the sample code he shared: