SwiftUI DocumentGroup apps provide standard menu items including Help.
By default, when we run the app, and click Help / "MyApp help" we see "Help isn't available for MyApp".
Here's the main app:
import SwiftUI
@main
struct MyApp: App {
var body: some Scene {
DocumentGroup(newDocument: { MyDocument() }) { configuration in
ContentView()
}
.commands {
// use CommandGroup to modify built-in menu behavior
// the following would work to replace the entire help menu
// but I just want to access the logic for the
// second of two Help sub-menus
CommandGroup(replacing: .help) {
// How do I access the logic for Help / MyApp Help?
}
}
}
}
I've reviewed the standard documentation, tutorials, and UI guidelines, but don't see much on how to integrate behaviors and adjustments to the standard menu options. Any assistance would be much appreciated.
This question from a year ago is similar, but unanswered.