Skip to main content
Hendoi

How to Build a macOS Menu Bar Utility App Using SwiftUI: A Complete Guide for Startups (2026)

12 min read

Startups in 2026 often want a small, always-available Mac tool—a menu bar utility app that lives in the status bar and opens a popover or menu. This guide walks you through building one with SwiftUI from scratch.

Menu bar apps keep your product one click away without cluttering the dock or desktop. They work well for timers, quick settings, notifications, or lightweight dashboards. US and Canadian startups use them to increase daily engagement. Building with SwiftUI keeps the codebase modern and maintainable. This guide assumes you have Xcode on a Mac and basic Swift knowledge; we will focus on the menu bar and popover pattern so you can ship a utility app your users will love.

Open Xcode and create a new project: File → New → Project. Choose App under macOS. Set your product name, team, and organization identifier. Select SwiftUI for the interface and Swift for the language. Create the project. You will get a default windowed app. We will add a status bar item and optionally hide or minimize the main window so the app feels like a menu bar utility. Ensure your deployment target is macOS 12 or later so SwiftUI and the latest APIs are available.

macOS menu bar presence is done via AppKit’s NSStatusBar. Create a helper class (e.g. StatusBarController) that runs at app launch. Get the system status bar and add a status item with NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength). Set the button’s image or title so users see your icon or label in the menu bar. Store a reference to the status item so it stays visible. When the user clicks the button, you will show a SwiftUI popover (next step). You can trigger this from your main @main App struct by initializing the controller in init() or applicationDidFinishLaunching if you use an AppDelegate.

Attach an NSPopover to your status bar button. Set its contentViewController to an NSHostingController that wraps your SwiftUI view. Your SwiftUI view can be a vertical stack of buttons, toggles, or a small dashboard—whatever your utility needs. Present the popover when the status item is clicked and dismiss it when the user clicks outside or chooses an action. This gives you a native menu bar utility app experience with SwiftUI driving the UI. Keep the popover content focused so it loads quickly and feels snappy.

For a “menu bar only” feel, avoid showing a main window at launch. In your App lifecycle, do not create or show a window, or set the window to be closed initially. Override applicationShouldTerminateAfterLastWindowClosed to return false so the app keeps running when there are no windows. The status bar item is the primary UI; the app quits when the user chooses Quit from the menu or your popover. If you prefer a hybrid (menu bar plus a settings window), you can open a window from a “Settings” or “Preferences” item in the popover.

Build and run (Cmd+R) and test the menu bar item and popover on different macOS versions. For distribution outside the Mac App Store you will need to code-sign and notarize your app; follow Apple’s notarization guide. For the Mac App Store, you will need a paid developer account and must comply with App Store guidelines. Many startups ship first as a direct-download (notarized) menu bar utility app and consider the Store later. If you want a macOS menu bar utility app built and shipped by an experienced team, Hendoi Technologies builds native macOS apps, including menu bar utilities, for US, Canadian, and Bengaluru startups. We handle architecture, SwiftUI, and distribution so you can focus on product. Get a free quote or book a consultation below.

Showing slide 1 of 6. Use the buttons below to change slide.

Need web app, mobile app, or desktop app development? We serve USA, Canada, and Bengaluru. React Native, Flutter, MCP servers, AI chatbots, SDKs, APIs. Explore our services and blog for more.

Book a Free Consultation