By default, on a macOS app using SwiftUI the window size is not restored after the window is closed.
Is there a way to keep whatever size & position the user gave before closing the app. Essentially I'd like close & open to behave in the same way to when the user quits & opens the app?
Is there something that should be added here?
import SwiftUI
@main
struct testApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Thanks in advance!