Widget opens Maps via maps://; onboarding prompts after Continue; forced first fetch

- Widget tap-to-directions now uses the native maps:// scheme instead of
  http://maps.apple.com. The universal-link http URL failed to open from a
  widget and fell back to launching the containing app; maps:// opens
  Apple Maps directly for both small (whole widget) and medium (per row).
- Onboarding: removed the Skip button (mandatory flow), and system prompts
  (location, notifications, local network) now fire only when the user taps
  Continue/Allow on each page — not when the page appears. Pages
  auto-advance once a permission is granted.
- After 'Start Using FuelBoard' the first data fetch is forced, so a
  reinstall that leaves a recent lastRefresh in app-group defaults can no
  longer skip the fetch and leave the station list empty. 35 tests pass.
This commit is contained in:
FuelBoard Contributor
2026-08-12 12:41:19 +01:00
parent 2a8de27571
commit 9ce0c83d66
4 changed files with 38 additions and 26 deletions
+4 -1
View File
@@ -154,8 +154,11 @@ struct FuelStation: Identifiable, Codable, Equatable {
}
/// Apple Maps directions URL used by the widget tap and app rows.
/// Uses the native `maps://` scheme (not `http://maps.apple.com`), which
/// opens Maps directly; universal-link http URLs fall back to opening the
/// containing app when tapped from a widget.
var mapsDirectionsURL: URL? {
URL(string: "http://maps.apple.com/?daddr=\(lat),\(lng)&t=d")
URL(string: "maps://?daddr=\(lat),\(lng)&t=d")
}
/// Name of the bundled brand logo asset, or nil if unknown.