In my app, I had an '.commands' region that provided an "Open File" shortcut, bound to Command-o. My app manages multiple files, so this triggers my own file picker and opens the file.
With iOS 2026, the system will not let me use this command, as the system is adding its own handler 'Open...' bound to the same shortcut, and with a target action called open:. My app also relies on LSSupportsOpeningDocumentsInPlace, which I believe is what triggers this behavior.
Attempts to override it produce errors like this:
Replacement elements conflict with existing elements:
Keyboard Shortcut (duplicate modifierFlags: command, input: O):
- Existing keyboard shortcut: <UIKeyCommand: 0x107cf4620> -> Title: Open... Action: open: Input: o + (UIKeyModifierCommand)
- Conflicting keyboard shortcut: <UIKeyCommand: 0x107cf56c0> -> Title: Open Action: _performMainMenuShortcutKeyCommand: Input: o + (UIKeyModifierCommand)
Ensure all keyboard shortcuts are unique to avoid undefined behavior.
Mine is the open without the ellipsis.
I would be happy if I could provide my own implementation of 'Open' and let SwiftUI call it, but I have not found any documentation for how to do this.
I managed to override the buildMenu on the AppDelegate class, and while this removes the system version of 'open' SwiftUI is still going behind my back and disabling the menu entry (I suspect it is looking up the command by shortcut/modifier).
So the closest I could do is to remove the system open menu with the buildMenu override, and then provide my own command with a different keyboard modifier (Control-o, instead of Command-o, which is ugly as hell, as everything else uses Command-Letter).
Any guidance would be appreciated.
Topic:
UI Frameworks
SubTopic:
SwiftUI