I'm seeking urgent help regarding a critical rendering issue that occurred after migrating to Xcode 26. My application uses MapKit within a UITabBarController setup. When I present a standard modal view controller (even a simple, empty UIViewController) over the MapViewController, the MKMapView in the background immediately disappears during the transition or upon completion. The map is visible and functional before the presentation starts. The crash is specifically a rendering failure, not an app crash.
The following errors/observations appear in the console:
• **Rendering Error:** `CAMetalLayer ignoring invalid setDrawableSize width=0.000000 height=0.000000` *
This confirms the MKMapView's frame is being crushed to zero size (width=0 or height=0) during the layout pass triggered by the modal presentation.
• **Hierarchy Error (Intermittent):** `Presenting view controller ... from detached view controller ... is not supported` *
The MapViewController instance is unstable or considered outside the window hierarchy when initiating presentation. (We attempted to fix this by presenting from the TabBarController/Root, but the visual glitch remains).
• **Presentation Style:** The issue occurs both with **custom transitions** (using UIPresentationController) and with **standard native sheet presentation** (using UISheetPresentationController / `.pageSheet`).
My Hierarchy Setup is:
1. The root view controller is a **UITabBarController**.
2. The MapViewController is one of the tabs.
3. The issue persists regardless of whether the presentation is triggered via `self.present(...)` or `tabBarController.present(...)`.
4. The MapView constraints are currently set to the **Superview edges (0, 0, 0, 0)**, not the Safe Area, to prevent layout collapse.
What Has Already Been Tried (And Failed) :
•Confirmed that MapView constraints are set to **Superview** (not Safe Area) to counter the 0x0 size error.
• Implemented `shouldRemovePresentersView = false` in the custom presentation controller.
• Disabled **Metal API Validation** in the scheme.
• Removed launch animations from `SceneDelegate`.
• Attempted the **Snapshot/Cover View** workaround (failed due to hierarchy instability).
•Also Try this :
UIDesignRequiresCompatibility
Has anyone else encountered this critical layout instability with MKMapView under modal presentations in the latest iOS SDK?
Is there a new required setting on the MKMapView (like `clipsToBounds` or a new `renderingMode`) to prevent this frame collapse?
Thank you for your time and help!