iOS 16 can not change orientation correctly when other window exists

On iOS16, when force rotating the screen with the new API requestGeometryUpdate:errorHandler: to force rotation of the screen, if there are other UIWindow on the top of the current screen, the rotation will only take effect on the top window. Is this a bug in iOS16? How to resolve this?

Each window tries to honor the supported interface orientations of their respective view controllers. For the window that's not rotating, take a look at the supportedInterfaceOrientations of its root view controller and make sure it supports the orientation you are requesting.

Here is the Demo recording.

I have the same problem.

I'm also facing this same issue. Is there a solution?

Same issue here, cannot find any solution.

Similar issues here with our app "Frax". Since iOS 16 we've experienced a variety of orientation-related issues, such as the app being rotated 90° in Stage Manager (a bug which affected Apple's Camera app for a while as well, so we're pretty sure it's an iOS bug), and not being able to reliably query the orientation of the device, which should correspond to status bar orientation. When I rotate the device, the app switcher bar in my app does not rotate, even when I'm explicitly supporting all orientations. Also, the system keyboard is always popping up in portrait orientation, even when the rest of the app (and device) is in landscape. Super frustrating.

I've found a workaround that seems to work as of iOS 16.6, haven't tried in earlier iOS 16 versions but I'm guessing it should probably work there too.

The workaround is to make three UIWindows: an orientation-flexible "dummy" window at the bottom, an orientation-locked window in the middle with your fixed content, and an orientation-flexible window on top with your swiveling UI. As long as the fixed-orientation UIWindow has .opaque = NO, iOS 16 will query the dummy window below it to determine the task bar orientation, and everything should work as expected. (But if the fixed-orientation window has .opaque = YES, then iOS ignores the window below it and the trick doesn't work.)

Give it a try, let me know if it helps!

iOS 16 can not change orientation correctly when other window exists
 
 
Q