Skip to content

iOS: Fix ignored orientation changes in embedded mode#119773

Open
abcjjy wants to merge 1 commit into
godotengine:masterfrom
abcjjy:fix-ios-orientation-4.6-master
Open

iOS: Fix ignored orientation changes in embedded mode#119773
abcjjy wants to merge 1 commit into
godotengine:masterfrom
abcjjy:fix-ios-orientation-4.6-master

Conversation

@abcjjy
Copy link
Copy Markdown

@abcjjy abcjjy commented May 26, 2026

What problem(s) does this PR solve?

Additional information

Fix orientation updates for embedded iOS builds.

Under the SwiftUI app lifecycle, the Godot view controller may be wrapped by a hosting controller that acts as the window's root view controller. Propagate orientation-related UIKit preferences to the root controller before requesting an update.

This also fixes orientation settings not being applied correctly on iOS.

When running under the SwiftUI app lifecycle, the Godot view controller can be wrapped by a hosting controller that becomes the window's root view controller. In that case, orientation-related UIKit selectors must be propagated to the root controller before requesting an interface orientation update.

This also fixes orientation settings not being applied correctly on iOS.
@abcjjy abcjjy requested a review from a team as a code owner May 26, 2026 08:23
@bruvzg bruvzg self-requested a review May 26, 2026 08:33
@AThousandShips AThousandShips added this to the 4.x milestone May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] screen_set_orientation does not physically rotate screen (SwiftUI hosting controller issue)

3 participants