import AppKit final class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ notification: Notification) { // Run as a menu-bar accessory (no Dock icon, no main window). // LSUIElement in Info.plist already enforces this; set it explicitly too // so behavior is unambiguous regardless of how the app is launched. NSApp.setActivationPolicy(.accessory) } }