Currently for my SwiftUI application i'm using dismissWindow() to close my windows. However, I want to make my app compatible on macOS 13 to enable a wider audience.
My current usage of this function is as follows:
func reloadContentViewAfterDelete() {
@Environment(\.openWindow) var openWindow
@Environment(\.dismissWindow) var dismissWindow
dismissWindow(id: "content")
openWindow(id: "content")
}