MetalKit Xcode 12 wrong bound size iPhone XS Max

Creating a default metalkit app from the game template and running it on the iPhone XS Max device gets the wrong bounds
Code Block (lldb) po view.bounds
▿ (0.0, 0.0, 320.0, 480.0)
  ▿ origin : (0.0, 0.0)
    - x : 0.0
    - y : 0.0
  ▿ size : (320.0, 480.0)
    - width : 320.0
    - height : 480.0

and does not invoke mtkview delegate function when rotating.

Everything works fine on an iPad Pro.

Please Help
Just an update, the mtkView function

Code Block
extension Renderer: MTKViewDelegate {
  func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) {
    .....
  }
....
}


gets invoked on the simulator and on the iPad during debugging, it does not get invoked during debugging on an iPhone device.

It does get invoked during running without debugging! I just tried Xcode 12.2 beta and the same result!

Please help
Another update, by adding the following code to the GameViewController everything works during debugging

Code Block
override func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) {
        coordinator.animate(alongsideTransition: { context in
            if UIApplication.shared.statusBarOrientation.isLandscape {
                // activate landscape changes
                os_log("Landscape")
            } else {
                // activate portrait changes
                os_log("portrait")
            }
        })
    }

Can someone please explain why?

Thank you in advance!

MetalKit Xcode 12 wrong bound size iPhone XS Max
 
 
Q