worthbak / inventory-checker-app

A macOS app for checking Apple Store inventory
https://worthbak.github.io/inventory-checker-app/
GNU General Public License v3.0
115 stars 24 forks source link

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

Closed justinlauffer closed 2 years ago

justinlauffer commented 2 years ago

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

worthbak commented 2 years ago

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 commented 2 years ago

This should be resolved in the next release 👍