Skip to content

[UIScene] Consistent lifecycle behavior for unattached FlutterEngine #191907

Closed

Description

@hellohuanlin

Use case

In the current state, for single scene, if a FlutterEngine is never attached to the view hierarchy.

(1) If the engine is created before scene connection notification, then it will receive all scene lifecycle events (including sceneWillConnect).
(2) If the engine is created after the notification, then it will not receive any scene lifecycle events after engine creation

This is because we add the engine to the list during notification, so if the engine misses this opportunity, then it's not tracked anymore.

Note: scene connection notification happens after sceneWillConnect delegate call, but they happen in the same run-loop.

Proposal

A more consistent behavior is, for single scenes, the engine should receive all the lifecycle events after its been created.

Activity

  1. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Aug 27, 2026
  2. github-actions commented on Oct 30, 2026

    @github-actions

    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.

  3. locked as resolved and limited conversation to collaborators on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions