Small widget: restore its own intent TYPE (minimal params) for the icon menu

iOS keys the long-press app-icon contextual menu by configuration-intent
TYPE, so sharing one intent across kinds collapsed the menu to the
first-registered kind (small) — the medium 'FuelBoard Prices' vanished
from the icon menu while the + gallery (kind-keyed) still listed both.
dafc96f's skeleton fix was never the problem; the extra favourite
AppEntity params were.

FIX: FuelBoardSmallWidgetConfigurationIntent — a distinct intent TYPE
with the IDENTICAL minimal parameter set (fuel/sort/distance only, no
AppEntity params). Fresh-widget default-config resolution stays intact;
the appex metadata now registers two WidgetConfiguration actions.

Verified: build green, 45/45 tests, extract.actionsdata lists both
intents, fresh IPA packaged + signed per component.
This commit is contained in:
FuelBoard Contributor
2026-08-14 02:28:43 +01:00
parent 050c9f13a3
commit 6375af4c05
2 changed files with 60 additions and 8 deletions
+12 -8
View File
@@ -76,20 +76,24 @@ struct FuelPriceWidget: Widget {
}
// Small widget exactly ONE station (the first of the configured result).
// Shares the medium widget's intent: the small intent with extra favourite
// AppEntity params failed fresh-widget default-config resolution at the
// system level (whole default config failed no timeline skeleton; proven
// by an A/B test where a small widget using this intent populated while the
// custom-intent small widget never even reached makeEntry). Favourites sort
// on the small face shows the cheapest favourite of the chosen fuel.
// 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
// cheapest favourite of the chosen fuel.
struct FuelPriceSmallWidget: Widget {
let kind = "FuelPriceWidgetSmall"
var body: some WidgetConfiguration {
AppIntentConfiguration(
kind: kind,
intent: FuelBoardWidgetConfigurationIntent.self,
provider: FuelPriceTimelineProvider<FuelBoardWidgetConfigurationIntent>(
intent: FuelBoardSmallWidgetConfigurationIntent.self,
provider: FuelPriceTimelineProvider<FuelBoardSmallWidgetConfigurationIntent>(
beaconTag: "FuelBoardSmallWidget"
)
) { entry in