We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75efab0 commit dfd4b90Copy full SHA for dfd4b90
Sources/OpenSwiftUI/AppStructure/AppOrganization/internal/LegacyApp.swift
@@ -0,0 +1,34 @@
1
+//
2
+// LegacyApp.swift
3
+// OpenSwiftUI
4
5
+// Created by Kyle on 2024/1/9.
6
+// Lastest Version: iOS 15.5
7
+// Status: Complete
8
+// ID: F8F4CFB3FB453F4ECC15C05B76BCD1E4
9
+
10
+public enum __App {}
11
12
+extension __App {
13
+ public static func run(_ rootView: some View) -> Never {
14
+ runApp(ShoeboxAdaptor(rootView: rootView))
15
+ }
16
+}
17
18
19
+ private struct ShoeboxAdaptor<V: View>: App {
20
+ var rootView: V
21
22
+ init() {
23
+ fatalError("Not a standalone App.")
24
25
26
+ init(rootView: V) {
27
+ self.rootView = rootView
28
29
30
+ var body: some Scene {
31
+ WindowGroup { rootView }
32
33
34
0 commit comments