NetNewsWire/Multiplatform/Shared/MainApp.swift

39 lines
795 B
Swift
Raw Normal View History

2020-06-27 18:22:01 +02:00
//
// MainApp.swift
2020-06-27 18:22:01 +02:00
// Shared
//
// Created by Maurice Parker on 6/27/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import SwiftUI
@main
struct MainApp: App {
#if os(macOS)
@NSApplicationDelegateAdaptor(AppDelegate.self) private var delegate
#endif
#if os(iOS)
@UIApplicationDelegateAdaptor(AppDelegate.self) private var delegate
#endif
2020-06-28 21:21:43 +02:00
@StateObject private var sceneModel = SceneModel()
2020-06-27 18:22:01 +02:00
var body: some Scene {
WindowGroup {
2020-06-28 21:21:43 +02:00
#if os(macOS)
SceneNavigationView()
.frame(minWidth: 600, idealWidth: 1000, maxWidth: .infinity, minHeight: 600, idealHeight: 700, maxHeight: .infinity)
.environmentObject(sceneModel)
#endif
#if os(iOS)
SceneNavigationView()
.environmentObject(sceneModel)
#endif
2020-06-27 18:22:01 +02:00
}
}
2020-06-28 21:21:43 +02:00
2020-06-27 18:22:01 +02:00
}