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.
This will allow decoupling `display_server.h` from a number of headers in the
codebase which only require those enums and not all the DisplayServer API.
The SwiftUI lifecycle wraps GDTViewController in a hosting controller
that becomes the window's root VC. iOS queries the root VC for
preferredScreenEdgesDeferringSystemGestures, prefersHomeIndicatorAutoHidden,
and prefersStatusBarHidden, but the hosting controller doesn't delegate
these to child VCs. This propagates the preference implementations onto
the root VC's class at runtime using class_addMethod.
This PR:
- Fixes the orientation detection logic on Android
- Adds an orientation_changed signal in DisplayServer
Co-Authored-By: bruvzg <7645683+bruvzg@users.noreply.github.com>
- Introduces a SCons builder for Swift files
- Increases the minimum deployment targets to iOS 14.0, and visionOS 26.0.
- Replaces manually UIWindow management by a SwiftUI instantiated app.