I am using following code to have a minimum size for my app, It looks something like this:
#if targetEnvironment(macCatalyst)
func addWindowSizeHandlerForMacOS() {
UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.forEach { windowScene in
print("addWindowSizeHandlerForMacOS()")
windowScene.sizeRestrictions?.minimumSize = CGSize(width: 800, height: 800)
// windowScene.sizeRestrictions?.maximumSize = CGSize(width: 801, height: 1101)
}
}
#endif
I want to have same minimum size as the default size for every time my mac catalyst apps opens.
Every instance my app relaunch it should open in its minimum size width and height i.e. 800 by 800.