I created 3 circular widget for the lockscreen (IOS 16). They work great, but only 1 shows up in the simulator and my real iPhone. How can I make them all show up ?
Here is the switch I use:
struct PlaneCalcWidgetView: View {
@Environment(\.widgetFamily) var size
var entry: WidgetProvider.Entry
var body: some View {
if #available(iOSApplicationExtension 16.0, *) {
switch size {
case .systemSmall:
SmallWidgetView(entry: entry)
case .systemMedium:
MediumWidgetView(entry: entry)
case .systemLarge:
LargeWidgetView(entry: entry)
case .accessoryCircular:
gaugeCircularWidget(entry: entry) <= First ONE
case .accessoryCircular:
gaugeMassCircularWidget(entry: entry) <= second ONE
case .accessoryCircular:
gaugePaxCircularWidget(entry: entry) <= third ONE
case .accessoryRectangular:
gaugeLinearWeatherWidget(entry: entry)
@unknown default:
Text("Unknown")
}
} else {
switch size {
case .systemSmall:
SmallWidgetView(entry: entry)
case .systemMedium:
MediumWidgetView(entry: entry)
case .systemLarge:
LargeWidgetView(entry: entry)
@unknown default:
Text("Unknown")
}
}
}
}