Opening SwiftUI Settings from AppKit

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?

Hi @martin , did you find any solution to this? Just stumbled into this issue as well.

Need this as well. All these new APIs are too limited to get any real work accomplished.

I also need an api that turns on Settings sense

Opening SwiftUI Settings from AppKit
 
 
Q