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 NativeDiagnostics.shared.start()
11 let client = NativeFeatureClient()
12 let model = FeatureRootModel(client: client)
13 _model = State(initialValue: model)
14 PlatformCloudDeliveryCoordinator.shared.install(
15 controller: client.t3ConnectController
16 )
17 PlatformBackgroundRefreshCoordinator.shared.install { [weak model] in
18 guard let model else { return false }
19 return await model.refreshInBackground()
20 }
21 }
22
23 var body: some Scene {
24 WindowGroup {
25 RootView {
26 PlatformRootView(model: model)
27 }
28 }
29 }
30}