iOS not updating viewport size immediately on orientation change, viewport stretched

Have created an app that supports both portrait and landscape orientation. For some reason, when changing orientation from portrait to landscape on iOS, the orientation rotates 90 degrees but the viewport does not adjust appropriately, resulting in it being stretched (see screenshots below).

Debug text in the upper left corner reveals that the app is detecting orientation appropriately, however, the actual viewport size does not immediately change.

Oddly, after some amount of time (between half a second and a minute, roughly), the viewport size change is detected (and can be seen in the debug text), after which the viewport adjusts appropriately getting rid of the stretched appearance. Same thing then happens when switching from landscape back to portrait.

Blueprint-only project, with .ipa built directly on Windows, installed via IPhonePackager. Running Unreal Engine 5.1.1, iOS 16.3.1


Landscape (immediate):

Landscape (after 0.5-60 seconds):

Debug text blueprint:

Can confirm this happens for me too, and I can get the stretch to fix itself by placing the iPhone flat on a table.

Bug report filed, case # 00542730. Occurs in a blank project as well, at least when building a BP project for iOS from Windows 10. Occurs whether installed via IPhonePackager or via TestFlight.

Hi Unreal Engine team any update on this here, this has been a problem ever since 5.1.0 has been released?

I can confirm this issue is occurring building on Mac for IOS in unreal engine 5.1.0 & 5.1.1.

Question to folks here, is there a way to force the orientation or phone thinking that its laying flat on the table, maybe we can trick the game thinking its laying flat in order to get the orientation to the right size?

Good to know this occurs when compiling on Mac as well.

Have been unable to find any way to force orientation change.

Tried forcing the screen resolution to change by using “Get Game User Settings” → “Set Screen Resolution” → “Apply Resolution Settings”, but with no luck (unsurprisingly, I don’t believe that functionality is enabled on iOS).

@NoahBeggs It use to work on iOS on 5.0.3 but broke after wards. Hope they fix this. I filled out 2 cases and heard nothing back and I haven’t seen anything on the internet or from unreal. I looked up their official defects/bugs and they still didn’t log it. This should be an easy fix on their side, but I guess they might have a back log. idk. I encourage folks impacted if you can, log a bug so they take It as a priority to fix, please. thanks all.

I actually noticed it in 5.1.0 but I thought it would be apparent and they’d fix it. now here we are 5.2 preview and still no fix :frowning: , wish I logged it earlier back in 5.1

How did you achieve dynamic ios portrait and landscape orientation? is there an option same as android where it says full sensor??

I also encountered this problem, I had to upgrade unreal5.1 in order to upload to the appstore, and I wanted to avoid this problem by using unreal5.0, but I couldn’t upload to the appstore