Commit Graph

9 Commits

Author SHA1 Message Date
Justin Jia 93c396382d iOS: Fix ignored orientation changes in embedded mode
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.
2026-05-26 13:52:21 +08:00
Rémi Verschelde 98868393cc Style: Enforce #include validation hook 2026-03-18 10:41:59 +01:00
Rémi Verschelde b8f501d37f Merge pull request #116633 from jaypaik/fix/ios-propagate-vc-preferences-through-swiftui-hosting
iOS: Propagate VC UI preferences to SwiftUI hosting controller
2026-03-16 23:41:12 +01:00
Rémi Verschelde a447ac95ec Move DisplayServer enums and typedefs to DisplayServerEnums
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.
2026-03-03 12:44:02 +01:00
jaypaik 0c8c425f9b iOS: Propagate VC UI preferences to SwiftUI hosting controller
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.
2026-02-22 15:10:10 -05:00
Anish Kumar e2369a834b Add device orientation change signal in DisplayServer
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>
2026-01-27 23:35:44 +05:30
Ricardo Sanchez-Saez 4bf4d10f5e Avoid warning when compiling on visionOS 26 SDK 2026-01-12 15:03:21 -08:00
KOGA Mitsuhiro 85ec5b9f42 Add platform lifecycle callbacks to CameraServer base class 2025-12-02 00:31:51 +09:00
Ricardo Sanchez-Saez 038f5934e7 [Apple embedded] Adopt SwiftUI lifecycle for Apple embedded platforms
- 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.
2025-09-22 18:20:04 -07:00