I am trying to create an application that starts with a Status Bar icon, and without a application window. It is for a macOS utility that will be invoked from menus displayed from the Status Bar icon.
Can this be done entirely within SwiftUI, or must I use AppKit?
This is what it looks like in AppKit / Cocoa
theItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
let theStatusButton = theItem!.button
theStatusButton?.title = "MyApp"
let menuItemOne = NSMenuItem(title: "Hey MyApp", action: nil, keyEquivalent: "")
statusMenu = NSMenu(title: "This to do in MyApp")
statusMenu!.addItem(menuItemOne)
theItem!.menu = statusMenu!
Thanks in advance for any help.