so i've been trying to add items to the right click menu when u right click on the app icon in the dock in macos
but when i do it with this code whenver i right click the app icon it re-adds the menu item
class myclass: NSObject , NSApplicationDelegate{
func applicationDockMenu(_ sender: NSApplication) -> NSMenu? {
dockMenu.addItem(withTitle: "test1", action: nil, keyEquivalent: "")
return dockMenu
}