initial commit: Proximity iOS app proposal, full Swift code scaffold, reference backend, testing docs, generated Xcode project

This commit is contained in:
2026-08-12 00:22:01 +00:00
commit 9d1b0f8dd9
52 changed files with 6271 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import SwiftUI
@main
struct ProximityApp: App {
@StateObject private var appState = AppState()
var body: some Scene {
WindowGroup {
RootView()
.environmentObject(appState)
.environmentObject(appState.presenceViewModel)
.environmentObject(appState.authService)
.environmentObject(appState.profileImportService)
.environmentObject(appState.revealFlow)
.environmentObject(appState.chatViewModel)
.environmentObject(appState.realtime)
}
}
}
/// Routes between the sign-in flow and the main app based on auth state.
struct RootView: View {
@EnvironmentObject private var appState: AppState
@EnvironmentObject private var authService: AuthService
var body: some View {
Group {
switch authService.state {
case .signedOut:
SignInView()
case .authenticating:
ProgressView("Signing in…")
case .authenticated:
ContentView()
}
}
.task {
await authService.restoreSession()
}
}
}