Here's a link to a sample project demonstrating the issue. (You may need to create a certificate/profile with the required entitlements.) Just build and run on an older device (pre iOS 17.5) to see the expected behavior, or on a newer device (iOS 17.5+) to see the problematic behavior and console messages.
Post
Replies
Boosts
Views
Activity
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!
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.