QuickMacApp The article provides Swift code for running any SwiftUI view as a standalone macOS application. It defines an `NSApplication` extension with a `run` method that sets up a custom menu bar and creates an `AppDelegate` to manage the window and hosting view. The code is inspired by minimalist Cocoa programming techniques. Last active May 23, 2026 17:58 - Star 190 /login?return to=https%3A%2F%2Fgist.github.com%2Fchriseidhof%2F26768f0b63fa3cdf8b46821e099df5ff You must be signed in to star a gist - Fork 31 /login?return to=https%3A%2F%2Fgist.github.com%2Fchriseidhof%2F26768f0b63fa3cdf8b46821e099df5ff You must be signed in to fork a gist - - Save chriseidhof/26768f0b63fa3cdf8b46821e099df5ff to your computer and use it in GitHub Desktop. QuickMacApp This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters https://github.co/hiddenchars | // Run any SwiftUI view as a Mac app. | | | import Cocoa | | | import SwiftUI | | | NSApplication.shared.run { | | | VStack { | | | Text "Hello, World" | | | .padding | | | .background Capsule .fill Color.blue | | | .padding | | | } | | | .frame maxWidth: .infinity, maxHeight: .infinity | | | } | | | extension NSApplication { | | | public func run