I have been using the following to detect the current interface orientation in iOS 14/15:
UIApplication.shared.windows.first!.windowScene!.interfaceOrientation
Now in iOS 16 Beta (1 and 2), it is reporting incorrectly. Landscape is being reported as Portrait Upsidedown.
2
Answers
Apple deprecated UIDevice orientation related api’s in iOS_16 instead use requestGeometryUpdate method which requests an update to the window scenes geometry.
For detailed information kindly check the following apple developer documentation.
requestGeometryUpdate
If you still not able to rotate the device successfully, kindly check the below link for possible root cause and the solution.
UISceneErrorDomain Code=101 issue and solution
I managed to deal with it in this way: