Search code examples
swiftcocoansmenu

Create Cocoa application without NSMenu


I'd like to create an application that pops up dialogs based on system events. However, this application should not have an NSMenu associated with it.

What I've tried, none of which worked:

  • Removing the NSMenu from the main storyboard but it doesn't allow me to delete it.
  • Overriding NSApplication and setting menu to nil.
  • Looking through Info.plist settings for a setting which allows my app to not have an NSMenu.

Any help would be appreciated.


Solution

  • Found the answer to my question:

    Setting "Application is agent (UIElement)" to YES in info.plist creates a window without creating a menu bar. This is the action I desired.

    enter image description here