import SwiftUI @main struct Sesame_Watch_Watch_AppApp: App { let keyManagement = KeyManagement() let history = HistoryManager() @State var selected: Int = 0 @State var didLaunchFromComplication = false var body: some Scene { WindowGroup { TabView(selection: $selected) { ContentView(didLaunchFromComplication: $didLaunchFromComplication) .environmentObject(keyManagement) .environmentObject(history) .tag(1) SettingsView() .environmentObject(keyManagement) .tag(2) HistoryView(history: history) .tag(3) } .tabViewStyle(PageTabViewStyle()) .onOpenURL { url in selected = 0 didLaunchFromComplication = true } } } }