# How to Build a Menu Bar App for Mac with SwiftUI

Canonical page: https://nativeshelf.com/blog/build-a-menu-bar-app-with-swiftui
Published: 2026-11-29 by Editorial team

> A practical introduction to menu bar apps on macOS: when they make sense, how MenuBarExtra works, how to hide the Dock icon, and what makes a menu bar app pleasant to use.

Some of the most-used apps on a Mac are small ones that sit in the menu bar. They're always one click away, take little space and don't ask for a window. If you have an idea for a small tool, this is a good shape for it.

## Is a menu bar app right for you?

It works when the app is:

- **Used briefly and often**, like checking the weather, a timer or a clipboard.
- **Glanceable**, where the icon or a few characters of text already tell the user something.
- **Background by nature**, such as sync, monitoring or a launcher.

If people spend long sessions inside the app, a regular window is a better home.

## The basics with MenuBarExtra

From macOS 13, SwiftUI includes a `MenuBarExtra` scene. You add it to your `App` and give it a title or icon and some content. There are two styles:

- **Menu style**: the content appears as a standard menu. It's quick to build and feels native.
- **Window style**: the content appears as a small panel under the icon. Use it when you need controls, a list or a text field.

Start with the menu style. Switch to a window only when a menu can't do the job.

## Keep the Dock icon out of the way

A menu bar app usually shouldn't appear in the Dock. Set the Info.plist key that marks it as an agent app (`LSUIElement`), and it will live only in the menu bar. If you need a settings window, you can open one when the user asks for it.

## Details that make it feel right

- **Launch at login.** People expect these apps to be there when they sign in. Offer it in settings, using the system's login item API.
- **A shortcut.** A global keyboard shortcut makes the app much faster to use.
- **Fast start-up.** The icon should appear almost at once. Do heavy work after launch.
- **Light and dark.** Use template images for the icon so it adapts to the menu bar.
- **Low resource use.** An app that's always running should barely register in Activity Monitor and shouldn't wake the CPU more than it must.

## Distribute it

You can ship through the Mac App Store or directly from your website. The store handles updates and payment, while direct distribution gives you more freedom. Our guide on [App Store vs direct distribution](/blog/mac-app-store-vs-direct-distribution) compares the two, and if you go direct you'll want to [notarize the app](/blog/how-to-notarize-a-mac-app) and set up [automatic updates](/blog/sparkle-updates-for-mac-apps).

## Get found

Menu bar apps have a loyal audience, and people look for them in lists. See how others present theirs in our roundup of the [best menu bar apps for Mac](/categories/menu-bar), then [submit yours](/submit) once it's ready.

## Menu bar apps on NativeShelf

Seeing what others fit into a menu bar helps you decide what yours should leave out. A few listed here:

- [DuoBar](/duobar): battery, Wi-Fi and memory in a single icon.
- [Tuck](/tuck): hides menu bar icons behind a thin line.
- [Vigil](/vigil): keeps the Mac awake, with a countdown in the menu bar.
- [Multimeter](/multimeter): small live meters for anything.