You can access the UIWindowScene call requestGeometryUpdate on it, like so:
(on some view)
.onAppear() {
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else {
return
}
let geometryRequest = UIWindowScene.GeometryPreferences.Vision(
// addition parameters: size, max size ...
resizingRestrictions: .uniform // maintain aspect ratio when resizing
)
windowScene.requestGeometryUpdate(geometryRequest)
}