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

**URL:** <https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588>\
**Category:** Mobile\
**Tags:** orientation, viewport-bugs, ios-ipa, unreal-engine, iOS, bug-report\
**Created:** [February 22, 2023, 9:06pm UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588 "2023-02-22T21:06:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoahBeggs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoahBeggs](https://forums.unrealengine.com/u/NoahBeggs)\
**Post date:** [February 22, 2023, 9:06pm UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/1 "2023-02-22T21:06:49Z")

</div>

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

Portrait:

 ![IMG_9306](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/a/94a8f1216d2a642bf02b02e2a3a2af69bf905279.png)

Landscape (immediate):

 ![IMG_9307.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/1/a11555b4be0d478058074e9dfa3e52b28c52308b.jpeg)

Landscape (after 0.5-60 seconds):

 ![IMG_9308.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/8/8d8ba1059cced0f39ed2b0d401b31ec8d368ad29.jpeg)

Debug text blueprint:

 ![DebugTextBP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/7/fd763aacbf13c885bd70e6b4d0bb78ad6b5ba02e.png)

---

<div class="post-metadata">

**Author:** ![anim8d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anim8d](https://forums.unrealengine.com/u/anim8d)\
**Post date:** [February 23, 2023, 2:46am UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/2 "2023-02-23T02:46:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NoahBeggs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoahBeggs](https://forums.unrealengine.com/u/NoahBeggs)\
**Post date:** [March 15, 2023, 1:39pm UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/3 "2023-03-15T13:39:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Go\_Gamer\_Girl](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/go_gamer_girl/32/677575_2.png) [@Go\_Gamer\_Girl](https://forums.unrealengine.com/u/Go_Gamer_Girl)\
**Post date:** [March 22, 2023, 5:01am UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/4 "2023-03-22T05:01:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![NoahBeggs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoahBeggs](https://forums.unrealengine.com/u/NoahBeggs)\
**Post date:** [March 27, 2023, 3:02am UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/5 "2023-03-27T03:02:10Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Go\_Gamer\_Girl](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/go_gamer_girl/32/677575_2.png) [@Go\_Gamer\_Girl](https://forums.unrealengine.com/u/Go_Gamer_Girl)\
**Post date:** [April 2, 2023, 10:13pm UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/6 "2023-04-02T22:13:24Z")

</div>

@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 ☹ , wish I logged it earlier back in 5.1

---

<div class="post-metadata">

**Author:** ![Faery0170](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Faery0170](https://forums.unrealengine.com/u/Faery0170)\
**Post date:** [May 19, 2023, 3:18am UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/7 "2023-05-19T03:18:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![W\_s\_xgx1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@W\_s\_xgx1](https://forums.unrealengine.com/u/W_s_xgx1)\
**Post date:** [May 26, 2023, 9:39am UTC](https://forums.unrealengine.com/t/ios-not-updating-viewport-size-immediately-on-orientation-change-viewport-stretched/776588/8 "2023-05-26T09:39:39Z")

</div>

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  
我也遇到了这个问题，我为了上传到appstore必须升级unreal5.1，想避开这个问题就要用unreal5.0，但上传不了appstore
