Minimal Flutter iOS project that reproduces a semantics loss issue when a
cached FlutterEngine is attached to a new FlutterViewController.
The iOS host starts one FlutterEngine in AppDelegate and keeps it alive for
the whole app lifetime. The native host screen creates a new
FlutterViewController each time the user taps Open Flutter screen.
This mirrors add-to-app integrations that intentionally reuse an engine instead of destroying it when a Flutter screen is dismissed.
flutter run- Launch the app on an iOS simulator or device.
- Open Accessibility Inspector or enable VoiceOver.
- Tap Open Flutter screen.
- Confirm that Flutter elements such as Display name, Marketing emails, and Save profile are visible in the iOS accessibility tree.
- Tap the native back button.
- Tap Open Flutter screen again.
- Inspect the Flutter screen again.
Flutter elements remain available through iOS accessibility after the cached
engine is attached to the second FlutterViewController.
The Flutter UI still renders, but the Flutter elements disappear from the iOS accessibility tree after reopening the screen with the same engine.
Destroying the engine between opens avoids the issue, but that is not viable for apps that intentionally share or cache a Flutter engine.