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.
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.
Recommended posts
View all posts (opens blog listing)Custom Database Engine as a Data Warehouse Alternative
When a custom engine can replace or complement a data warehouse. Real-time, cost, and use cases. USA Canada India.
Read moreOLAP vs OLTP: When to Use a Custom Engine for Each
OLAP (analytics) vs OLTP (transactions). When a custom engine fits each, and when to keep them separate. USA Canada India.
Read moreWhat Is VeloxDB? Custom Database Engine by Hendoi
VeloxDB is Hendoi’s custom database engine offering. Purpose-built for hot-path workloads. USA Canada India.
Read moreHow to Choose a Custom Database Engine Development Agency in India
What to look for when hiring an India-based agency for custom database engine development. USA Canada clients.
Read moreSub‑Millisecond API Latency: How a Custom Engine Hits p99
How custom database engines achieve sub‑ms p99 latency for APIs. Design choices and when it matters. USA Canada India.
Read moreBuild vs Buy Database Engine: CTO Decision Framework 2026
When to build a custom database engine vs buy (managed DB). Decision framework for CTOs. USA Canada India.
Read moreCustom Database Engine for E‑commerce Inventory & Cart
Why e‑commerce uses custom engines for inventory and cart. Consistency, latency, and scale. USA Canada India.
Read moreGraph Database vs Custom Engine: Use Cases & When to Build
When to use a graph DB (Neo4j, etc.) vs a custom engine for graph-like access. Performance and cost. USA Canada India.
Read moreCustom Search Engine vs Elasticsearch: When to Build Your Own
When to use Elasticsearch vs building a custom search or index engine. Cost, scale, and control. USA Canada India.
Read moreCustom Database Engine for Healthcare: HIPAA & Data Security
Building a custom database engine for healthcare. HIPAA, encryption, audit. USA Canada India. What to specify.
Read moreWhen to Replace DynamoDB With a Custom Key-Value Engine
When DynamoDB cost or latency forces a move to a custom key-value engine. What to consider. USA Canada India.
Read moreC++ Database Engine Development in India: Cost & Timeline
What it costs to build a C++ database or storage engine with a team in India. USA and Canada clients. 2026.
Read moreCustom Database Engine as a Data Warehouse Alternative
When a custom engine can replace or complement a data warehouse. Real-time, cost, and use cases. USA Canada India.
Read moreOLAP vs OLTP: When to Use a Custom Engine for Each
OLAP (analytics) vs OLTP (transactions). When a custom engine fits each, and when to keep them separate. USA Canada India.
Read moreWhat Is VeloxDB? Custom Database Engine by Hendoi
VeloxDB is Hendoi’s custom database engine offering. Purpose-built for hot-path workloads. USA Canada India.
Read moreHow to Choose a Custom Database Engine Development Agency in India
What to look for when hiring an India-based agency for custom database engine development. USA Canada clients.
Read moreSub‑Millisecond API Latency: How a Custom Engine Hits p99
How custom database engines achieve sub‑ms p99 latency for APIs. Design choices and when it matters. USA Canada India.
Read moreBuild vs Buy Database Engine: CTO Decision Framework 2026
When to build a custom database engine vs buy (managed DB). Decision framework for CTOs. USA Canada India.
Read moreCustom Database Engine for E‑commerce Inventory & Cart
Why e‑commerce uses custom engines for inventory and cart. Consistency, latency, and scale. USA Canada India.
Read moreGraph Database vs Custom Engine: Use Cases & When to Build
When to use a graph DB (Neo4j, etc.) vs a custom engine for graph-like access. Performance and cost. USA Canada India.
Read moreCustom Search Engine vs Elasticsearch: When to Build Your Own
When to use Elasticsearch vs building a custom search or index engine. Cost, scale, and control. USA Canada India.
Read moreCustom Database Engine for Healthcare: HIPAA & Data Security
Building a custom database engine for healthcare. HIPAA, encryption, audit. USA Canada India. What to specify.
Read moreWhen to Replace DynamoDB With a Custom Key-Value Engine
When DynamoDB cost or latency forces a move to a custom key-value engine. What to consider. USA Canada India.
Read moreC++ Database Engine Development in India: Cost & Timeline
What it costs to build a C++ database or storage engine with a team in India. USA and Canada clients. 2026.
Read more