main
swift 25 lines 821 Bytes
Raw
1 import SwiftUI
2
3 @main
4 struct KleponApp: App {
5 @StateObject private var appState = AppState()
6
7 var body: some Scene {
8 WindowGroup {
9 AppRootView()
10 .environmentObject(appState)
11 .environmentObject(appState.favoritesStore)
12 .environmentObject(appState.recentSearchStore)
13 .environmentObject(appState.recentlyViewedStore)
14 .environmentObject(appState.guideEngine)
15 .environmentObject(appState.accountStore)
16 #if os(iOS)
17 .preferredColorScheme(
18 UIDevice.current.userInterfaceIdiom == .pad ? nil : .light)
19 #endif
20 }
21 #if os(macOS) || os(visionOS)
22 .defaultSize(width: 1100, height: 760)
23 #endif
24 }
25 }