inventory-checker-app icon indicating copy to clipboard operation
inventory-checker-app copied to clipboard

Button for Preferences/Settings doesn't work in macOS 13.0 and beyond

Open justinlauffer opened this issue 2 years ago • 1 comments

In macOS 13.0 and beyond, with the change from Preferences to Settings, the Button to the settings window no longer works.

NSApp .sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil) } has been deprecated and replaced with: NSApp .sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil) }

I am unsure if it's backwards compatible, though.

Reference: https://stackoverflow.com/questions/65355696/how-to-programatically-open-settings-window-in-a-macos-swiftui-app

justinlauffer avatar Sep 10 '22 20:09 justinlauffer

The reason this is broken in Ventura is that Apple added new a WindowGroup API for macOS windowing in SwiftUI, deprecating the methods I'm using, and I haven't had a chance to adopt the new stuff yet - planning on it before Ventura's release next month 👍

worthbak avatar Sep 11 '22 15:09 worthbak

This should be resolved in the next release 👍

worthbak avatar Sep 30 '22 14:09 worthbak