iPadOS: remove system actions from Menu Bar

Hi, I am setting up the iPadOS26 Menu Bar, and it comes with some existing menu items that don't make sense for my app. For example, under "File" menu, there are options for New Window, Duplicate, Move, Rename and Export that I would like to remove (which keeping the Close Window option).

What's the best way to do this?

if you're building your app with SwiftUI, you're looking for

CommandGroup(replacing: .windowList) { }

if you remove too many (for example, if the windowList command group contains Close Window), then you'll need to put it back in manually, using CommandMenu. But if you don't have a New Window command, why would you keep Close Window around? What happens when you close the last (or only) window? If you elect to quit the app, all you need it a Quit command, which is another menu.

Hi. Sorry I didn't specify, but I'm using UIKit. I figured I can use

UIMainMenuSystem.Configuration().documentPreference = .removed and that removes the unnecessary File menu items. It still shows a 'Close Window' command instead of a 'Quit' command though.

Specifying through the configuration that your app doesn't prefer document commands is the most correct solution, though you can also tell the builder to remove the .document menu.

iPadOS: remove system actions from Menu Bar
 
 
Q