I have an app that uses AppKit and SwiftUI. The app settings are made with SwiftUI
On macOS 13 you could use the following to open SwiftUI settings:
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
On macOS 14 Sonoma the above does not work anymore, instead you have to use a SwiftUI View called SettingsLink.
Now the problem is, my app needs to open Settings from a part of the app that uses AppKit. My app does not show or use its menubar, so Settings are not accessible from there, so I provide access from a NSMenuItem.
How can I programmatically open SwiftUI Settings from AppKit?