How to disable the window resize on Mac catalyst

I want to disable the window resize of my Mac catalyst app,I try a code, but it error.

I tried codes:
Code Block
UIWindowScene?.sizeRestrictions!.minimumSize = CGSize(width: 1080, height: 1024)
UIWindowScene?.sizeRestrictions!.maximumSize = CGSize(width: 1080, height: 1024)

Does anyone have any other code to implement it?

Thanks.
How to disable the window resize on Mac catalyst
 
 
Q