diff --git a/FuelBoardWidgets/FuelPriceWidget.swift b/FuelBoardWidgets/FuelPriceWidget.swift index 26df698..6d82b65 100644 --- a/FuelBoardWidgets/FuelPriceWidget.swift +++ b/FuelBoardWidgets/FuelPriceWidget.swift @@ -75,16 +75,23 @@ struct FuelPriceWidget: Widget { } } -// Small widget — exactly ONE station (the first of the configured result). -// Uses its OWN intent TYPE (FuelBoardSmallWidgetConfigurationIntent) with the -// IDENTICAL minimal parameter set as the medium intent. iOS keys the -// long-press app-icon contextual menu by configuration-intent TYPE, so two -// kinds sharing one intent collapsed there to the first-registered kind (the -// small widget won — medium vanished from the icon menu). Distinct intent -// TYPE, same minimal params: restores both entries in the icon menu AND keeps -// fresh-widget default-config resolution working (the skeleton root cause was -// the extra favourite AppEntity params, not intent separation — see the -// Fresh-widget defaults section). Favourites sort on the small face shows the +// Small widget — exactly ONE station (the first of the configured result) +// when rendered at systemSmall; the SAME kind also supports .systemMedium, +// where the shared view renders the station list (identical content to the +// medium widget — the view branches on family, not kind). +// +// WHY medium is here (2026-08-14): the iOS 18+ long-press app-icon menu +// ("turn app icon into a widget") shows the supported SIZES of the +// FIRST-registered widget kind only — it does NOT list widget kinds, and it +// is NOT keyed by configuration-intent type (a two-intent experiment, +// 6375af4, changed nothing on-device). So the bundle's first kind decides +// which size tiles the icon menu offers: small-only meant the menu showed +// only the small tile even though the app has a medium widget. Giving this +// first-registered kind BOTH .systemSmall and .systemMedium puts both size +// tiles in the icon menu (ChatGPT/Safari show multiple sizes the same way — +// their first kind supports several families). The gallery still lists both +// widget kinds in bundle order (small, then medium); this kind's entry just +// gains a medium variant. Favourites sort on the small face shows the // cheapest favourite of the chosen fuel. struct FuelPriceSmallWidget: Widget { let kind = "FuelPriceWidgetSmall" @@ -104,7 +111,7 @@ struct FuelPriceSmallWidget: Widget { } .configurationDisplayName("FuelBoard Small") .description("Fuel prices near you. Configure fuel + sort per widget.") - .supportedFamilies([.systemSmall]) + .supportedFamilies([.systemSmall, .systemMedium]) .disfavoredLocations([.carPlay], for: [.systemSmall]) } }