The function call has been renamed in macOS 13 Ventura.
The solution:
// Version specific function call, as this changed in macOS 13 (Ventura)
if #available(macOS 13, *) {
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
} else {
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: