← poker-tutor
import SwiftUI
import PokerUI
/// The Mac app is a window with `RootView` in it. Everything else lives in `PokerUI`, which the
/// iPhone app puts on screen exactly the same way.
@main
struct PokerTutorMacApp: App {
@State private var app = AppState(variant: .pokerTutor)
var body: some Scene {
WindowGroup("Poker Tutor") {
RootView()
.environment(app)
.frame(minWidth: 900, minHeight: 640)
.preferredColorScheme(.dark)
// The free allowance and the App Store. Only the shipping apps switch this on:
// the suite and the command line play far more hands than anybody pays for.
.task { app.startCharging() }
}
// Mac-only window furniture. Skip's Android packaging compiles every target for the
// iPhone first, this one included, and iPhones have no windows to style.
#if os(macOS)
.windowStyle(.hiddenTitleBar)
.defaultSize(width: 1240, height: 820)
#endif
}
}