I am trying to get the application to be the size of the full screen using Catalyst supported APIs. I have tried using the UIScreen proeprty as well as the window property(below), but both have the problem where the window does not fill the full screen.
I have attached my code, but the window does not occupy the full screen size.
let windowRect = self.window?.frame
let windowWidth = windowRect?.size.width
let windowHeight = windowRect?.size.height
UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.forEach { windowScene in
windowScene.sizeRestrictions?.minimumSize = CGSize(width: windowWidth! , height:windowHeight! )
windowScene.sizeRestrictions?.maximumSize = CGSize(width: windowWidth!, height: windowHeight!)
}