I understand that using GeometryReader in SwiftUI or accessing an NSWindow’s bounds/frame in AppKit is ideal for obtaining the dimensions of a specific window or view. However, my objective is different — I need to determine the resolution of the entire, usable screen available on macOS. In other words, I’m looking to retrieve the full physical display size (or the “usable” portion, accounting for elements like the menu bar or dock) rather than just the size of the active window.
Could Apple recommend a futureproof way to obtain this global screen resolution? Or, if no alternative exists, is it acceptable to continue using NSScreen.frame (or NSScreen.visibleFrame for usable space) despite its drawbacks in multi-window or multitasking scenarios?