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)
}
Post
Replies
Boosts
Views
Activity
Abbreviated code snippets:
init() { }
var body: some Scene {
Settings { PreferencesView() } // Defines the application setting/preferences window
WindowGroup { // Display the main content browser application window
MainView(database: database, windowVisible: $windowVisible)
}
}
}
struct PreferencesView: View {
var body: some View {
TabView {
GeneralPreferencesView()
...