macos-app-structure
Installation
SKILL.md
macOS App Structure
Critical Constraints
- ❌ DO NOT use iOS-only scenes (
TabViewas root scene) → ✅ UseWindowGroup,Window, orNavigationSplitView - ❌ DO NOT use
UIApplicationDelegate→ ✅ UseNSApplicationDelegateAdaptorfor AppKit hooks - ❌ DO NOT forget
Settingsscene for Preferences → ✅ macOS apps should have a Settings scene - ❌ DO NOT assume single-window → ✅ macOS apps can have multiple windows; design for it
- ❌ DO NOT use iOS navigation patterns → ✅ Use
NavigationSplitView(sidebar + detail) for macOS
Standard macOS App
import SwiftUI
@main
struct MyApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate