remove Expo project and all related files
Remove the entire Expo/React Native application: routes (app/), source code (src/), assets, iOS native build, config plugins, StoreKit config, npm dependencies, TypeScript/ESLint/Vitest configs, and Expo-specific documentation. The repository now contains only: admin-web, supabase, youtube-worker, tabatago-swift, docs, scripts, and CI/tooling configs.
This commit is contained in:
18
tabatago-swift/TabataGo/App/AppState.swift
Normal file
18
tabatago-swift/TabataGo/App/AppState.swift
Normal file
@@ -0,0 +1,18 @@
|
||||
import Foundation
|
||||
import Observation
|
||||
|
||||
/// Global app bootstrap state — initialises all services once at launch.
|
||||
@Observable
|
||||
final class AppState {
|
||||
|
||||
var isBootstrapped = false
|
||||
|
||||
@MainActor
|
||||
func bootstrap() async {
|
||||
guard !isBootstrapped else { return }
|
||||
guard !AppEnvironment.isPreview else { isBootstrapped = true; return }
|
||||
await PurchaseService.shared.initialize()
|
||||
AnalyticsService.shared.initialize()
|
||||
isBootstrapped = true
|
||||
}
|
||||
}
|
||||
21
tabatago-swift/TabataGo/App/RootView.swift
Normal file
21
tabatago-swift/TabataGo/App/RootView.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
import SwiftUI
|
||||
import SwiftData
|
||||
|
||||
/// Root entry point: decides between onboarding and main tab view.
|
||||
struct RootView: View {
|
||||
@Environment(AppState.self) private var appState
|
||||
@Query private var profiles: [UserProfile]
|
||||
|
||||
private var profile: UserProfile? { profiles.first }
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if let profile, profile.onboardingCompleted {
|
||||
MainTabView()
|
||||
} else {
|
||||
OnboardingView()
|
||||
}
|
||||
}
|
||||
.animation(.easeInOut(duration: 0.3), value: profile?.onboardingCompleted)
|
||||
}
|
||||
}
|
||||
19
tabatago-swift/TabataGo/App/TabataGoApp.swift
Normal file
19
tabatago-swift/TabataGo/App/TabataGoApp.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
import SwiftUI
|
||||
import SwiftData
|
||||
|
||||
@main
|
||||
struct TabataGoApp: App {
|
||||
|
||||
@State private var appState = AppState()
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
RootView()
|
||||
.environment(appState)
|
||||
.modelContainer(TabataGoSchema.container)
|
||||
.task {
|
||||
await appState.bootstrap()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user