Summary
flutter_carplay 1.3.3's required iOS setup — a manually-created shared FlutterEngine
plus a classic SceneDelegate — is incompatible with apps that have adopted Flutter's
new UISceneDelegate lifecycle (FlutterSceneDelegate + FlutterImplicitEngineDelegate).
Adopting flutter_carplay forces a revert to the legacy engine/scene pattern, which breaks
features that depend on the implicit engine (e.g. plugin registration / background isolates
used for notification taps when the app is terminated).
Environment
- flutter_carplay: 1.3.3
- Flutter: 3.35+ (UISceneDelegate migration adopted)
- Platform: iOS / CarPlay
Current required setup (legacy)
The README requires:
- A global, manually-created engine:
let flutterEngine = FlutterEngine(name: "SharedEngine", project: nil, allowHeadlessExecution: true)
run inside application(_:didFinishLaunchingWithOptions:).
- A classic
SceneDelegate.swift conforming to UIWindowSceneDelegate.
- Info.plist
UIWindowSceneSessionRoleApplication → that custom SceneDelegate, plus
CPTemplateApplicationSceneSessionRoleApplication → flutter_carplay.FlutterCarPlaySceneDelegate.
New Flutter embedding (what recent Flutter generates / recommends)
AppDelegate adopts FlutterImplicitEngineDelegate and implements
didInitializeImplicitFlutterEngine(_:); plugins register on the implicit engine via
engineBridge.pluginRegistry. No engine is created manually.
- Info.plist
UIWindowSceneSessionRoleApplication → UISceneDelegateClassName = FlutterSceneDelegate.
- Ref: https://docs.flutter.dev/release/breaking-changes/uiscenedelegate
The conflict
There is no documented way to use flutter_carplay alongside FlutterSceneDelegate / the
implicit engine. Satisfying flutter_carplay requires replacing FlutterSceneDelegate with a
custom SceneDelegate and abandoning the implicit engine for a manual shared engine. That
revert breaks apps relying on the implicit engine — in our case the background isolate wired
through didInitializeImplicitFlutterEngine for notification taps after termination.
Request
Please support the new UIScene embedding:
- Let
FlutterCarPlaySceneDelegate attach to the implicit engine (or an app-provided
engine / binaryMessenger) instead of requiring a hard-coded global SharedEngine.
- Let the phone scene keep using
FlutterSceneDelegate.
- Document a setup path for apps that have adopted the UISceneDelegate migration.
Workaround
For now we implemented CarPlay natively (a CPTemplateApplicationSceneDelegate scene bridging
to Dart over a MethodChannel), which leaves the new embedding untouched. First-class
flutter_carplay support for the implicit engine would be much nicer.
Summary
flutter_carplay 1.3.3's required iOS setup — a manually-created shared
FlutterEngineplus a classic
SceneDelegate— is incompatible with apps that have adopted Flutter'snew UISceneDelegate lifecycle (
FlutterSceneDelegate+FlutterImplicitEngineDelegate).Adopting flutter_carplay forces a revert to the legacy engine/scene pattern, which breaks
features that depend on the implicit engine (e.g. plugin registration / background isolates
used for notification taps when the app is terminated).
Environment
Current required setup (legacy)
The README requires:
let flutterEngine = FlutterEngine(name: "SharedEngine", project: nil, allowHeadlessExecution: true)run inside
application(_:didFinishLaunchingWithOptions:).SceneDelegate.swiftconforming toUIWindowSceneDelegate.UIWindowSceneSessionRoleApplication→ that customSceneDelegate, plusCPTemplateApplicationSceneSessionRoleApplication→flutter_carplay.FlutterCarPlaySceneDelegate.New Flutter embedding (what recent Flutter generates / recommends)
AppDelegateadoptsFlutterImplicitEngineDelegateand implementsdidInitializeImplicitFlutterEngine(_:); plugins register on the implicit engine viaengineBridge.pluginRegistry. No engine is created manually.UIWindowSceneSessionRoleApplication→UISceneDelegateClassName = FlutterSceneDelegate.The conflict
There is no documented way to use flutter_carplay alongside
FlutterSceneDelegate/ theimplicit engine. Satisfying flutter_carplay requires replacing
FlutterSceneDelegatewith acustom
SceneDelegateand abandoning the implicit engine for a manual shared engine. Thatrevert breaks apps relying on the implicit engine — in our case the background isolate wired
through
didInitializeImplicitFlutterEnginefor notification taps after termination.Request
Please support the new UIScene embedding:
FlutterCarPlaySceneDelegateattach to the implicit engine (or an app-providedengine /
binaryMessenger) instead of requiring a hard-coded globalSharedEngine.FlutterSceneDelegate.Workaround
For now we implemented CarPlay natively (a
CPTemplateApplicationSceneDelegatescene bridgingto Dart over a
MethodChannel), which leaves the new embedding untouched. First-classflutter_carplay support for the implicit engine would be much nicer.