Same scenario as you. In iOS beta 3, they mentioned:
Attempting to set an orientation on UIDevice via setValue:forKey: isn’t supported and no longer works. (93367651)
In iOS beta 4 which is released yesterday, they mentioned it is Fixed.
However, the issue still the same on iOS 16 beta 4
[Orientation] BUG IN CLIENT OF UIKIT: Setting UIDevice.orientation is not supported. Please use UIWindowScene.requestGeometryUpdate(_:)
My code is working fine on older iOS versions too.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: