App Store prep: privacy manifests, 1.0.1 (2), OGL attribution, UK empty state, screenshot harness
- PrivacyInfo.xcprivacy in app + widget targets (UserDefaults 1C8F.1; app declares Location linked + Diagnostics not-linked, no tracking) - Version bump 1.0.1 (2) in App + Widget plists - Settings → Data source footer: OGL attribution + 'refresh up to twice a day' - Stations empty state: friendly UK-only explainer + 'Browse all UK stations' - ContentView launch-arg harness (pattern of -showKeySheet): -skipOnboarding and -tab stations|favourites|alerts|settings for screenshot capture - APPSTORE.md updated (blockers struck, tasks done, yuzu-hub workflow) - BACKLOG.md hygiene: GitHub-first header, Trends merged note, offline-first-run DONE
This commit is contained in:
@@ -33,6 +33,7 @@ struct ContentView: View {
|
||||
@State private var isLoading = false
|
||||
@State private var statusMessage = ""
|
||||
@State private var showOnboarding = false
|
||||
@State private var selectedTab = 0
|
||||
@State private var locationManager = LocationManager()
|
||||
@StateObject private var monitor = ProximityMonitor()
|
||||
|
||||
@@ -137,12 +138,14 @@ struct ContentView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
TabView {
|
||||
TabView(selection: $selectedTab) {
|
||||
stationsTab
|
||||
.tabItem { Label("Stations", systemImage: "fuelpump.fill") }
|
||||
.tag(0)
|
||||
|
||||
favouritesTab
|
||||
.tabItem { Label("Favourites", systemImage: "star.fill") }
|
||||
.tag(1)
|
||||
|
||||
AlertsView(
|
||||
enabled: $alertsEnabled,
|
||||
@@ -159,8 +162,10 @@ struct ContentView: View {
|
||||
lastAlert: monitor.lastAlert
|
||||
)
|
||||
.tabItem { Label("Alerts", systemImage: "bell.fill") }
|
||||
.tag(2)
|
||||
|
||||
settingsTab
|
||||
.tag(3)
|
||||
}
|
||||
.fullScreenCover(isPresented: $showOnboarding) {
|
||||
OnboardingView {
|
||||
@@ -171,11 +176,28 @@ struct ContentView: View {
|
||||
StationMapView(request: request)
|
||||
}
|
||||
.onAppear {
|
||||
// Launch-arg hooks for the screenshot/UI-test harness (same
|
||||
// pattern as StationsView's `-showKeySheet`): `-tab <name>`
|
||||
// opens the given tab; `-skipOnboarding` skips onboarding
|
||||
// without touching the stored flag.
|
||||
let args = ProcessInfo.processInfo.arguments
|
||||
if let i = args.firstIndex(of: "-tab"), i + 1 < args.count {
|
||||
switch args[i + 1] {
|
||||
case "favourites": selectedTab = 1
|
||||
case "alerts": selectedTab = 2
|
||||
case "settings": selectedTab = 3
|
||||
default: selectedTab = 0
|
||||
}
|
||||
}
|
||||
// Onboarding runs first on a fresh install — it owns the initial
|
||||
// permission prompts (location, notifications, and the data/local
|
||||
// network probe on the Data page). Location tracking and the first
|
||||
// network fetch start once it's done.
|
||||
if FuelStore.loadHasCompletedOnboarding() {
|
||||
// Launch-arg hook (UI-testing/screenshot harness, same pattern as
|
||||
// StationsView's `-showKeySheet`): skip onboarding without
|
||||
// touching the stored flag.
|
||||
if FuelStore.loadHasCompletedOnboarding()
|
||||
|| args.contains("-skipOnboarding") {
|
||||
locationManager.startForegroundTracking()
|
||||
// Geofences must follow the user even in the background:
|
||||
// wire the delegate hook (fires on every fix incl. background
|
||||
|
||||
Reference in New Issue
Block a user