diff options
Diffstat (limited to 'Sora/App')
| -rw-r--r-- | Sora/App/SoraApp.swift | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Sora/App/SoraApp.swift b/Sora/App/SoraApp.swift new file mode 100644 index 0000000..cea526f --- /dev/null +++ b/Sora/App/SoraApp.swift @@ -0,0 +1,31 @@ +import SwiftUI + +func debugPrint( + _ items: Any..., + separator: String = " ", + terminator: String = "\n" +) { + #if DEBUG + Swift.print(items, separator: separator, terminator: terminator) + #endif +} + +@main +struct SoraApp: App { + @StateObject private var settings = SettingsManager() + + var body: some Scene { + WindowGroup { + MainView() + .environmentObject(settings) + } + + #if os(macOS) + SwiftUI.Settings { + SettingsView() + .environmentObject(settings) + .windowResizeBehavior(.enabled) + } + #endif + } +} |