Looks like building with the new SDK adds an automatic ‘Open' menu item to Mac Catalyst, and it doesn't look like there’s a public API menu identifier to remove it 😑

Hopper time.

And the solution is:

builder.remove(menu: UIMenu.Identifier("com.apple.menu.open"))

Come on, folks. Export your symbols.

@stroughtonsmith Another solution (other than removing it via the UIKit code you suggested) is to embrace it by implementing `@IBAction func open(_ sender: AnyObject?)` on your AppDelegate.

I submitted a handful of feedbacks including FB14662087 on this one but they didn't get anywhere.

@cocoawithlove Hi, Matt. Your approach works fine for my Catalyst app on Mac. On iPad, though, it crashes the app with a "duplicate command” error:

"Menu has duplicates --
<_UIImmutableKeyCommand: 0x10496e940> -> Title: Open... Action: open: Input: o + (UIKeyModifierCommand)
<UIKeyCommand: 0x10496fd40> -> Title: Open... Action: open: Input: o + (UIKeyModifierCommand)”

I presume my open: implementation adds the 2nd UIKeyCommand. I can't find a way to remove or override the 1st, though.

@chmohler That error is because you're adding your own Open command. My approach was just to use the existing one that iOS 18 shoves in without asking.
@cocoawithlove (part 1 of 3) I suspect my problem is different (but perhaps related) to the one you and Steve are addressing. I don't get the shoved-in Open command in my app’s Mac *interface*. Still, Xcode 16 adds the UIImmutableKeyCommand open command to all Catalyst document-based apps, and that command conflicts with my own open command implementation. The Xcode 16-provided UIImmutableKeyCommand open command appears and is functional only on iPad, not Mac.
@cocoawithlove (part 2 of 3) To avoid the above-mentioned key command conflict, I'd like simply to bind my open command implementation to the Xcode 16-provided UIImmutableKeyCommand open command. But without that Xcode16-provided command being visible in my app storyboard (which I'm using to build out the macOS main menu), there is no menu command there to bind my custom @IBAction func open(_ sender: AnyObject?) implementation to.
@cocoawithlove (part 3 of 3) I might have to rework the macOS menu implementation of my app, using buildMenu(with:) in code rather than a storyboard, to see if I can replace the Xcode16-provided open command's implementation with my own. That command's being an instance of _UIImmutableKeyCommand, though, makes me wonder whether its implementation even *can* be replaced.