SwiftUI provides
SettingsLinkfor opening settings[…] Simple, right? Except it doesn’t work reliably inMenuBarExtra. The documentation doesn’t mention this limitation.[…]
The root issue is that
NSApplicationtreats menu bar apps as background utilities, not foreground applications. This affects how windows are ordered and receive events.[…]
Apple provides an
openSettingsenvironment action for programmatic access (available since macOS 14.0+)[…] This currently works on macOS 15, but doesn’t work on macOS Tahoe (26). The logic needs an existing SwiftUI render tree, and simply calling the environment variable does nothing if none is found.[…]
This shouldn’t be so hard. Opening a settings window is one of the most basic operations any app needs to perform. The fact that it requires hidden windows, activation policy juggling, and precise timing delays in 2025 is a testament to how menu bar apps remain second-class citizens in SwiftUI.
Anyone who’s done any amount of SwiftUI on the Mac would not be at all surprised at the amount of hoops required to jump through for things that seem like they should be quite simple.
Previously:
Cocoa Mac macOS 15 Sequoia macOS Tahoe 26 Menu Bar Programming Swift Programming Language SwiftUI