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
[UIScene] last minute sceneWillConnect registration is missing corner cases #185688
My understanding is that, this code is in-place because the engine hasn't been added to the listeners list when sceneWillConnect is called, So it performs a workaround at last minute, to see if the rootVC is a FlutterVC, and if so, registers the engine.
This is missing corner cases when FlutterVC isn't the rootVC.
@vashworth Did i mis-read the intention of this code? My understanding is that this code is in-place to handle missing registration at last minute, and the rootVC check here is missing corner cases (but maybe this is not for single scene scenarios?):
changed the title [-][UIScene] For single scene setup, plugins may still miss `sceneWillConnect` delegate calls[/-][+][UIScene] Plugins may still miss `sceneWillConnect` delegate calls in some cases[/+]on May 1, 2026
changed the title [-][UIScene] Plugins may still miss `sceneWillConnect` delegate calls in some cases[/-][+][UIScene] last minute `sceneWillConnect` registration is missing corner cases[/+]on May 1, 2026
My understanding is that this code is in-place to handle missing registration at last minute, and the rootVC check here is missing corner cases (but maybe this is not for single scene scenarios?):
This is only for multi-scene. Single scene is handled by the code I mentioned above
My understanding is that this code is in-place to handle missing registration at last minute, and the rootVC check here is missing corner cases (but maybe this is not for single scene scenarios?):
This is only for multi-scene. Single scene is handled by the code I mentioned above
Gotcha. I assumed this code was for single scene because the guide says:
When multiple scenes is enabled (UIApplicationSupportsMultipleScenes), Flutter can't automatically associate a FlutterEngine with a scene during the scene connection phase.
So this is actually inaccurate, as it does indeed associate for multi-scenes too, but only for some cases.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
vashworth commentedon May 1, 2026
Single scene apps are always registered here:
flutter/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm
Lines 317 to 332 in d0c6490
I don't think there are any edge-cases that don't get hit here. If you can think of any, feel free to re-open.
hellohuanlin commentedon May 1, 2026
@vashworth Did i mis-read the intention of this code? My understanding is that this code is in-place to handle missing registration at last minute, and the
rootVCcheck here is missing corner cases (but maybe this is not for single scene scenarios?):flutter/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterSceneLifeCycle.mm
Lines 195 to 203 in 61fca76
[-][UIScene] For single scene setup, plugins may still miss `sceneWillConnect` delegate calls[/-][+][UIScene] Plugins may still miss `sceneWillConnect` delegate calls in some cases[/+][-][UIScene] Plugins may still miss `sceneWillConnect` delegate calls in some cases[/-][+][UIScene] last minute `sceneWillConnect` registration is missing corner cases[/+]hellohuanlin commentedon May 1, 2026
Ok I updated the wording of the issue, but still pending clarification on #185688 (comment)
Re-openning
vashworth commentedon May 1, 2026
This is only for multi-scene. Single scene is handled by the code I mentioned above
hellohuanlin commentedon May 1, 2026
Gotcha. I assumed this code was for single scene because the guide says:
So this is actually inaccurate, as it does indeed associate for multi-scenes too, but only for some cases.
Cross linking to flutter/website#13344 for website update
[ios] Use DFS traversal to find engines of a scene automatically (rat…
[ios] Use DFS traversal to find engines of a scene automatically (rat…
github-actions commentedon Oct 30, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.