Skip to content

iOS app lifecycle and FlutterViewController lifecycle are ambiguously merged #37226

@loongliu

Description

@loongliu

In FlutterViewController.mm, Flutter's lifecycle is binding with FlutterViewController' and UIApplication at the same time. This may be not correct when use flutter with add2app.

When FlutterViewController is covered by other native ViewController, Flutter's lifecycle is paused. Now when application resign active and become active again. FlutterViewController is not visible but Flutter's lifecycle is resume due to UIApplication notification.

This pr fixes problem.

This problem is critical when some logic needs to be executed when flutter becomes resumed.
What's more, if one needs to show keyboard when flutter becomes resumed, the keyboard will be shown on the native UIViewController.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowc: API breakBackwards-incompatible API changesengineflutter/engine related. See also e: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions