You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[iOS] Scene disconnect closes the XAML Window, but iOS also disconnects backgrounded scenes that can reconnectΒ #24813
area/skia βοΈCategorizes an issue or PR as relevant to Skiakind/bugSomething isn't workingplatform/ios πCategorizes an issue or PR as relevant to the iOS platform
Found by code review; not reproduced on a device yet.
UnoUISceneDelegate.DidDisconnect β NativeWindowWrapper.OnSceneDisconnected() raises Closing/Closed and closes the XAML Window.
UIKit also disconnects scenes that are merely backgrounded, to reclaim memory, and those may reconnect later (sceneDidDisconnect(_:): "The scene may reconnect later, as its session was not necessarily discarded"). The signal that the user actually closed the window is application(_:didDiscardSceneSessions:), which UnoUIApplicationDelegate does not handle.
Resulting sequence on iPad:
The app has a secondary window, and the user backgrounds it.
iOS reclaims the scene β DidDisconnect β Uno closes the XAML Window (and Window.Closed fires even though the user never closed it).
The user taps the window in the app switcher β the same session reconnects. connectionOptions carries no Uno GUID, so the window is either destroyed (No window is awaiting a scene) or matched through the "oldest pending window" fallback and takes an unrelated pending window.
Expected behavior π―
A disconnect only removes the window's native surface. The XAML Window stays alive and is re-bound when the same session (UISceneSession.PersistentIdentifier) reconnects. Window.Closed fires when the session is discarded, or when the app calls Close().
How to reproduce it (as minimally and precisely as possible) π¬
SamplesApp (scene manifest enabled) on the iPad simulator. Open a secondary window.
Background the app, then force scene disconnection. Either use Xcode β Debug β Simulate Memory Warning while backgrounded, or open enough other apps. The disconnect can be confirmed with a log in OnSceneDisconnected.
Return to the secondary window from the app switcher.
Suspected actual: the window's Closed was raised, and the reconnected session is discarded or shows the wrong content.
Workaround π οΈ
None known.
Renderer π¨
Skia
Native
Affected platforms π±π»π₯οΈ
iOS
Uno.Sdk version (and other relevant versions) π¦
area/skia βοΈCategorizes an issue or PR as relevant to Skiakind/bugSomething isn't workingplatform/ios πCategorizes an issue or PR as relevant to the iOS platform
Activity
MartinZikmund commentedon Sep 29, 2026
Proposed fix: #24814