Open History to see the last commit
1import SwiftUI
2
3@main
4@MainActor
5struct T3CodeApp: App {
6 @UIApplicationDelegateAdaptor(T3PlatformAppDelegate.self) private var appDelegate
7 @State private var model: FeatureRootModel
8
9 init() {
10 let client = NativeFeatureClient()
11 let model = FeatureRootModel(client: client)
12 _model = State(initialValue: model)
13 PlatformCloudDeliveryCoordinator.shared.install(
14 controller: client.t3ConnectController
15 )
16 PlatformBackgroundRefreshCoordinator.shared.install { [weak model] in
17 guard let model else { return false }
18 return await model.refreshInBackground()
19 }
20 }
21
22 var body: some Scene {
23 WindowGroup {
24 RootView {
25 PlatformRootView(model: model)
26 }
27 }
28 }
29}