Member-only story

The FlutterEngine is created on iOS at what time?

Wing CHAN
2 min readMay 11, 2024

--

In a Flutter project, the FlutterViewController is created by a Storyboard, which starts after the AppDelegate `didFinishLaunchingWithOptions`

If I switch to a different root view controller in the Storyboard, this FlutterEngine will not be created.
The memory usage is only 27.5 MB because the FlutterEngine has not been created yet.

After I click the Button, it will navigate to the FlutterViewController page, meaning a FlutterEngine will be created and memory usage has increased to 112.9 MB.

FlutterViewController cycle

reference

Initial time

create [[FlutterEngine]] in initial time, but not start e.g: [engine setViewController:self];

  1. initWithEngine:nibName:bundle:
  2. initWithProject:nibName:bundle:
  3. initWithNibName:bundle:, init

viewDidLoad

--

--

Wing CHAN
Wing CHAN

Written by Wing CHAN

Mobile Dev 📱 iOS, Flutter

No responses yet