Skip to content

[firebase_messaging]: onMessage stream never fires after UIScene migration on iOS — Messaging.messaging().delegate is nil after plugin registration via FlutterImplicitEngineDelegate #18204

Description

@kekene48

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Messaging

Which platforms are affected?

iOS

Description

After migrating a Flutter iOS app to use UISceneDelegation (via FlutterSceneDelegate in Info.plist), FirebaseMessaging.onMessage in Dart never fires for foreground messages. Background banners appear correctly via APNs, but the Dart layer receives nothing — no onMessage, no onMessageOpenedApp logs, and no getInitialMessage data.

What works:
FCM token is generated and non-null
Push notification banners appear when the app is backgrounded
didRegisterForRemoteNotificationsWithDeviceToken fires correctly
UNUserNotificationCenter willPresent fires correctly (confirmed via Swift print)
Messaging.messaging().appDidReceiveMessage(userInfo) is called successfully from willPresent

What breaks:
FirebaseMessaging.onMessage never fires in Dart
FirebaseMessaging.onMessageOpenedApp never fires in Dart
No Dart-side logs appear for any incoming notification

Root Cause (Diagnosed): When using FlutterImplicitEngineDelegate, plugins are registered via: func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) }, After GeneratedPluginRegistrant.register runs, FLTFirebaseMessagingPlugin is expected to set itself as Messaging.messaging().delegate. However, printing the delegate immediately after registration reveals: print(Messaging.messaging().delegate) // → nil

Reproducing the issue

Create a Flutter app with firebase_messaging and flutter_local_notifications
Migrate iOS to UIScene by adding UIApplicationSceneManifest to Info.plist with UISceneDelegateClassName set to FlutterSceneDelegate
Implement FlutterImplicitEngineDelegate in AppDelegate and register plugins via engineBridge.pluginRegistry
Set FirebaseAppDelegateProxyEnabled to false in Info.plist
Set up FirebaseMessaging.onMessage.listen(...) in Dart
Run on a physical device and send a push notification while the app is in the foreground
Observe: banner appears, Dart listener never fires, Messaging.messaging().delegate is nil

Firebase Core version

3.13.0

Flutter Version

3.41.6

Relevant Log Output

[✓] Flutter (Channel stable, 3.41.6, on macOS 26.3.1 25D771280a darwin-arm64, locale en-US) [557ms]
    • Flutter version 3.41.6 on channel stable at /Users/user/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db50e20168 (3 weeks ago), 2026-03-25 16:21:00 -0700
    • Engine revision 425cfb54d0
    • Dart version 3.11.4
    • DevTools version 2.54.2
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations,
      enable-native-assets, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [34.7s]
    • Android SDK at /Users/user/Library/Android/sdk
    • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
    • Platform android-36, build-tools 36.1.0
    • ANDROID_HOME = /Users/user/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.4) [10.0s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17E192
    • CocoaPods version 1.16.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [4ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Connected device (2 available) [6.4s]
    • Kelv (wireless) (mobile) • 00008110-001454DA1A8A801E • ios          • iOS 26.3.1 23D8133
    • macOS (desktop)          • macos                     • darwin-arm64 • macOS 26.3.1 25D771280a darwin-arm64

[✓] Network resources [8.4s]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.11.4
Flutter SDK 3.41.6
[my_app_name] 1.0.0+1

dependencies:
- asn1lib 1.6.5
- carousel_slider 5.1.1 [flutter]
- connectivity_plus 6.1.5 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection]
- country_picker 2.0.27 [collection universal_io flutter]
- cryptography 2.7.0 [collection crypto ffi js meta typed_data]
- cupertino_icons 1.0.8
- device_info_plus 11.5.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry]
- dio 5.9.0 [async collection http_parser meta mime path dio_web_adapter]
- dropdown_search 6.0.2 [flutter]
- file_picker 10.3.10 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32 cross_file web dbus]
- firebase_auth 5.7.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.15.2 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_database 11.3.10 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter]
- firebase_messaging 15.2.10 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_form_builder 10.1.0 [flutter intl]
- flutter_idensic_mobile_sdk_plugin 1.38.0 [flutter]
- flutter_inappwebview 6.1.5 [flutter flutter_inappwebview_platform_interface flutter_inappwebview_android flutter_inappwebview_ios flutter_inappwebview_macos flutter_inappwebview_web flutter_inappwebview_windows]                                                                                                             
- flutter_local_notifications 19.4.2 [clock flutter flutter_local_notifications_linux flutter_local_notifications_windows flutter_local_notifications_platform_interface timezone]                                                                                                                                                
- flutter_native_splash 2.4.6 [args flutter flutter_web_plugins html image meta path universal_io xml yaml ansicolor]
- flutter_screenutil 5.9.3 [flutter]
- flutter_secure_storage 9.2.4 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta]                                                                                                                       
- flutter_svg 2.2.1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_windowmanager_plus 1.0.1 [flutter]
- font_awesome_flutter 10.9.1 [flutter]
- form_builder_validators 11.2.0 [flutter flutter_localizations intl]
- geolocator 14.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows geolocator_linux]
- get_it 8.2.0 [async collection meta]
- hooks_riverpod 2.6.1 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier]
- http 1.5.0 [async http_parser meta web]
- http_parser 4.1.2 [collection source_span string_scanner typed_data]
- image_picker 1.2.0 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows]                                                                                                                                              
- internet_connection_checker 3.0.1 [connectivity_plus equatable flutter http]
- internet_connection_checker_plus 2.7.2 [connectivity_plus flutter http]
- intl 0.20.2 [clock meta path]
- intl_phone_field 3.2.0 [flutter]
- json_annotation 4.10.0 [meta]
- local_auth 2.3.0 [flutter local_auth_android local_auth_darwin local_auth_platform_interface local_auth_windows]
- mime 2.0.0
- open_filex 4.7.0 [flutter ffi]
- path 1.9.1
- path_provider 2.1.5 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- permission_handler 12.0.1 [flutter meta permission_handler_android permission_handler_apple permission_handler_html permission_handler_windows permission_handler_platform_interface]                                                                                                                                           
- pin_code_fields 8.0.1 [flutter]
- pointycastle 4.0.0 [collection convert]
- shared_preferences 2.5.3 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]                                                                                                                    
- smooth_page_indicator 1.2.1 [flutter]
- social_sharing_plus 1.2.3 [flutter plugin_platform_interface]
- socket_io_client 3.1.2 [logging socket_io_common web]
- syncfusion_flutter_charts 28.2.12 [flutter intl vector_math syncfusion_flutter_core]
- syncfusion_flutter_pdfviewer 28.2.12 [flutter vector_math web async http uuid device_info_plus intl syncfusion_pdfviewer_platform_interface syncfusion_pdfviewer_web syncfusion_pdfviewer_macos syncfusion_pdfviewer_windows syncfusion_flutter_core syncfusion_flutter_pdf syncfusion_flutter_signaturepad url_launcher]       
- system_info_plus 0.0.6 [flutter]
- url_launcher 6.3.2 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]                                                                                                                                                  
- uuid 4.5.3 [crypto fixnum]
- web_socket_channel 3.0.3 [async crypto stream_channel web web_socket]
- webview_flutter 4.13.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]
- webview_flutter_android 4.10.1 [flutter meta webview_flutter_platform_interface]

dev dependencies:
- build_runner 2.11.1 [analyzer args async build build_config build_daemon built_collection built_value code_builder collection convert crypto dart_style glob graphs http_multi_server io json_annotation logging meta mime package_config path pool pub_semver shelf shelf_web_socket stream_transform watcher web_socket_channel yaml]                                                                                                                                                          
- flutter_launcher_icons 0.14.4 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_lints 5.0.0 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing collection meta stream_channel]
- json_serializable 6.12.0 [analyzer async build build_config dart_style json_annotation json_schema meta path pub_semver pubspec_parse source_gen source_helper]
- mocktail 1.0.4 [collection matcher test_api]

transitive dependencies:
- _fe_analyzer_shared 93.0.0 [meta source_span]
- _flutterfire_internals 1.3.59 [collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer 10.0.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- ansicolor 2.0.3
- archive 4.0.7 [crypto path posix]
- args 2.7.0
- async 2.13.0 [collection meta]
- boolean_selector 2.1.2 [source_span string_scanner]
- build 4.0.4 [analyzer crypto glob logging package_config path]
- build_config 1.2.0 [checked_yaml json_annotation path pubspec_parse]
- build_daemon 4.1.1 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- built_collection 5.1.1
- built_value 8.12.3 [built_collection collection fixnum meta]
- characters 1.4.1
- checked_yaml 2.0.4 [json_annotation source_span yaml]
- cli_util 0.4.2 [meta path]
- clock 1.1.2
- code_builder 4.11.1 [built_collection built_value collection matcher meta]
- collection 1.19.1
- connectivity_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- convert 3.1.2 [typed_data]
- cross_file 0.3.4+2 [meta web]
- crypto 3.0.6 [typed_data]
- csslib 1.0.2 [source_span]
- dart_style 3.1.5 [analyzer args collection package_config path pub_semver source_span yaml]
- dbus 0.7.11 [args ffi meta xml]
- device_info_plus_platform_interface 7.0.3 [flutter meta plugin_platform_interface]
- dio_web_adapter 2.1.1 [dio http_parser meta web]
- equatable 2.0.7 [collection meta]
- fake_async 1.3.3 [clock collection]
- ffi 2.1.4
- file 7.0.1 [meta path]
- file_selector_linux 0.9.3+2 [cross_file file_selector_platform_interface flutter]
- file_selector_macos 0.9.4+4 [cross_file file_selector_platform_interface flutter]
- file_selector_platform_interface 2.6.2 [cross_file flutter http plugin_platform_interface]
- file_selector_windows 0.9.3+4 [cross_file file_selector_platform_interface flutter]
- firebase_auth_platform_interface 7.7.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.15.3 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_platform_interface 6.0.2 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.24.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_database_platform_interface 0.2.6+10 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_web 0.2.6+16 [collection firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins]
- firebase_messaging_platform_interface 4.6.10 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.10.10 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web]                                                                                                                                                              
- fixnum 1.1.1
- flutter_hooks 0.21.3+1 [flutter]
- flutter_inappwebview_android 1.1.3 [flutter flutter_inappwebview_platform_interface]
- flutter_inappwebview_internal_annotations 1.2.0
- flutter_inappwebview_ios 1.1.2 [flutter flutter_inappwebview_platform_interface]
- flutter_inappwebview_macos 1.1.2 [flutter flutter_inappwebview_platform_interface]
- flutter_inappwebview_platform_interface 1.3.0+1 [flutter flutter_inappwebview_internal_annotations plugin_platform_interface]
- flutter_inappwebview_web 1.1.2 [flutter flutter_web_plugins web flutter_inappwebview_platform_interface]
- flutter_inappwebview_windows 0.6.0 [flutter flutter_inappwebview_platform_interface]
- flutter_local_notifications_linux 6.0.0 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories]
- flutter_local_notifications_platform_interface 9.1.0 [plugin_platform_interface]
- flutter_local_notifications_windows 1.0.3 [flutter ffi flutter_local_notifications_platform_interface meta timezone xml]
- flutter_localizations 0.0.0 [flutter intl path]
- flutter_plugin_android_lifecycle 2.0.31 [flutter]
- flutter_riverpod 2.6.1 [collection flutter meta riverpod state_notifier]
- flutter_secure_storage_linux 1.2.3 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_macos 3.1.3 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 1.1.2 [flutter plugin_platform_interface]
- flutter_secure_storage_web 1.2.1 [flutter flutter_secure_storage_platform_interface flutter_web_plugins js]
- flutter_secure_storage_windows 3.1.2 [ffi flutter flutter_secure_storage_platform_interface path path_provider win32]
- flutter_web_plugins 0.0.0 [flutter]
- geoclue 0.1.1 [dbus meta]
- geolocator_android 5.0.2 [flutter geolocator_platform_interface meta uuid]
- geolocator_apple 2.3.13 [flutter geolocator_platform_interface]
- geolocator_linux 0.2.4 [dbus flutter geoclue geolocator_platform_interface gsettings package_info_plus]
- geolocator_platform_interface 4.2.6 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 4.1.3 [flutter flutter_web_plugins geolocator_platform_interface web]
- geolocator_windows 0.2.5 [flutter geolocator_platform_interface]
- glob 2.1.3 [async collection file path string_scanner]
- graphs 2.3.2 [collection]
- gsettings 0.2.8 [dbus xdg_directories]
- html 0.15.6 [csslib source_span]
- http_multi_server 3.2.2 [async]
- image 4.5.4 [archive meta xml]
- image_picker_android 0.8.13+1 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 3.1.0 [flutter flutter_web_plugins image_picker_platform_interface mime web]
- image_picker_ios 0.8.13 [flutter image_picker_platform_interface]
- image_picker_linux 0.2.2 [file_selector_linux file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_macos 0.2.2 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_platform_interface 2.11.0 [cross_file flutter http plugin_platform_interface]
- image_picker_windows 0.2.2 [file_selector_platform_interface file_selector_windows flutter image_picker_platform_interface]
- io 1.0.5 [meta path string_scanner]
- js 0.6.7 [meta]
- json_schema 5.2.2 [collection http logging rfc_6901 uri]
- leak_tracker 11.0.2 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.10 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.2 [leak_tracker matcher meta]
- lints 5.1.1
- local_auth_android 1.0.52 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface]
- local_auth_darwin 1.6.0 [flutter intl local_auth_platform_interface]
- local_auth_platform_interface 1.1.0 [flutter plugin_platform_interface]
- local_auth_windows 1.0.11 [flutter local_auth_platform_interface]
- logging 1.3.0
- matcher 0.12.19 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.13.0 [collection]
- meta 1.17.0
- nm 0.5.0 [dbus]
- package_config 2.2.0 [path]
- package_info_plus 9.0.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32 clock]
- package_info_plus_platform_interface 3.2.1 [flutter meta plugin_platform_interface]
- path_parsing 1.1.0 [meta vector_math]
- path_provider_android 2.2.19 [flutter path_provider_platform_interface]
- path_provider_foundation 2.4.2 [flutter path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface]
- path_provider_windows 2.3.0 [ffi flutter path path_provider_platform_interface]
- permission_handler_android 13.0.1 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.4.7 [flutter permission_handler_platform_interface]
- permission_handler_html 0.1.3+5 [flutter flutter_web_plugins permission_handler_platform_interface web]
- permission_handler_platform_interface 4.3.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.2.1 [flutter permission_handler_platform_interface]
- petitparser 7.0.1 [meta collection]
- platform 3.1.6
- plugin_platform_interface 2.1.8 [meta]
- pool 1.5.2 [async stack_trace]
- posix 6.0.3 [ffi meta path]
- pub_semver 2.2.0 [collection]
- pubspec_parse 1.5.0 [checked_yaml collection json_annotation pub_semver yaml]
- quiver 3.2.2 [matcher]
- rfc_6901 0.2.1
- riverpod 2.6.1 [collection meta stack_trace state_notifier]
- shared_preferences_android 2.4.13 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.5.4 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.4.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.4.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.4.3 [flutter flutter_web_plugins shared_preferences_platform_interface web]
- shared_preferences_windows 2.4.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.4.2 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 3.0.0 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.0
- socket_io_common 3.1.1 [logging]
- source_gen 4.2.0 [analyzer async build dart_style glob path pub_semver source_span yaml]
- source_helper 1.3.10 [analyzer source_gen]
- source_span 1.10.1 [collection path term_glyph]
- stack_trace 1.12.1 [path]
- state_notifier 1.0.0 [meta]
- stream_channel 2.1.4 [async]
- stream_transform 2.1.1
- string_scanner 1.4.1 [source_span]
- syncfusion_flutter_core 28.2.12 [vector_math flutter]
- syncfusion_flutter_pdf 28.2.12 [flutter intl xml syncfusion_flutter_core crypto convert http]
- syncfusion_flutter_signaturepad 28.2.12 [flutter syncfusion_flutter_core]
- syncfusion_pdfviewer_macos 28.2.12 [flutter syncfusion_pdfviewer_platform_interface]
- syncfusion_pdfviewer_platform_interface 28.2.12 [flutter plugin_platform_interface]
- syncfusion_pdfviewer_web 28.2.12 [flutter flutter_web_plugins web syncfusion_pdfviewer_platform_interface]
- syncfusion_pdfviewer_windows 28.2.12 [flutter]
- term_glyph 1.2.2
- test_api 0.7.10 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- timezone 0.10.1 [http path]
- typed_data 1.4.0 [collection]
- universal_io 2.2.2 [collection meta typed_data]
- uri 1.0.0 [matcher quiver]
- url_launcher_android 6.3.20 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.3.4 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.3 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.4.1 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.4 [flutter url_launcher_platform_interface]
- vector_graphics 1.1.19 [flutter http vector_graphics_codec]
- vector_graphics_codec 1.1.13
- vector_graphics_compiler 1.1.19 [args meta path path_parsing vector_graphics_codec xml]
- vector_math 2.2.0
- vm_service 15.0.0
- watcher 1.2.1 [async path]
- web 1.1.1
- web_socket 1.0.1 [web]
- webview_flutter_platform_interface 2.14.0 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 3.23.0 [flutter meta path webview_flutter_platform_interface]
- win32 5.15.0 [ffi]
- win32_registry 2.1.0 [ffi meta win32]
- xdg_directories 1.1.0 [meta path]
- xml 6.6.1 [collection meta petitparser]
- yaml 3.1.3 [collection source_span string_scanner]

Additional context and comments

Attempted Workarounds (all failed):
Re-enabling FirebaseAppDelegateProxyEnabled — delegate still nil
Manually calling Messaging.messaging().appDidReceiveMessage(userInfo) from willPresent — no effect when delegate is nil
Capturing Messaging.messaging().delegate into a strong property after registration — still nil because the plugin was already deallocated before the capture
Trying to instantiate FLTFirebaseMessagingPlugin() directly in Swift — type not accessible without a bridging header

Expected Behaviour
Messaging.messaging().delegate should be non-nil after GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) completes, and FirebaseMessaging.onMessage should fire in Dart for foreground messages, consistent with behaviour before UIScene migration.

Activity

  1. SelaseKay commented on Apr 17, 2026

    @SelaseKay
    Contributor

    Hi @kekene48, I'm unable to reproduce this using the firebase_messaging example app which has also been migrated. Could you cross check against the example to ensure you're not missing anything?

  2. kekene48 commented on Apr 17, 2026

    @kekene48
    Author

    Hello @SelaseKay In the example app, Objective C is used for the AppDelegate files, but in my app, I use just the AppDelegate.Swift file.

    Here is my appdelegate.swift file and my info.plist file to see if it will help you reproduce:

    import Flutter import Firebase import UserNotifications import flutter_local_notifications @main @objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { FirebaseApp.configure() UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] UNUserNotificationCenter.current().requestAuthorization(options: authOptions) { _, _ in } application.registerForRemoteNotifications() // GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { // This is required to make any communication available in the action isolate. FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in GeneratedPluginRegistrant.register(with: registry) } GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) } override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Messaging.messaging().apnsToken = deviceToken // print("✅ APNs token: \(deviceToken.map { String(format: "%02x", $0) }.joined())") super.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken) } // override func application(_ application: UIApplication, // didReceiveRemoteNotification userInfo: [AnyHashable : Any], // fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { // Messaging.messaging().appDidReceiveMessage(userInfo) // completionHandler(.newData) // } }

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "[http://www.apple.com/DTDs/PropertyList-1.0.dtd">](http://www.apple.com/DTDs/PropertyList-1.0.dtd%22%3E) <plist version="1.0"> <dict> <key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <false/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneClassName</key> <string>UIWindowScene</string> <key>UISceneDelegateClassName</key> <string>FlutterSceneDelegate</string> <key>UISceneConfigurationName</key> <string>flutter</string> <key>UISceneStoryboardFile</key> <string>Main</string> </dict> </array> </dict> </dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleDisplayName</key> <string>Bongo Payments</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>bongo_pay</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string> <key>CFBundleSignature</key> <string>????</string> <key>UIBackgroundModes</key> <array> <string>remote-notification</string> </array> <key>FirebaseAppDelegateProxyEnabled</key> <false/> <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string> <key>NSLocationWhenInUseUsageDescription</key> <string>We need your location to provide better service.</string> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <string>This app uses notifications</string> <key>NSLocationAlwaysUsageDescription</key> <string>We need your location even when the app is in the background.</string> <key>NSUserTrackingUsageDescription</key> <string>This app uses notifications</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>NSFaceIDUsageDescription</key> <string>This app requires Face ID authentication to secure your personal data and ensure only you can access your account.</string> <key>NSCameraUsageDescription</key> <string>We need access to your camera to take photos.</string> <key>NSPhotoLibraryUsageDescription</key> <string>We need access to your photo library to upload images.</string> <key>NSAppleMusicUsageDescription</key> <string>This app does not use Apple Music but requires limited media library access for system features.</string> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>CADisableMinimumFrameDurationOnPhone</key> <true/> <key>UIApplicationSupportsIndirectInputEvents</key> <true/> <key>io.flutter.embedded_views_preview</key> <true/> <key>NSMicrophoneUsageDescription</key> <string>We need access to your microphone for video or audio capture in web pages.</string> <key>NSPhotoLibraryAddUsageDescription</key> <string>We need access to save images to your photo library.</string> <key>UIFileSharingEnabled</key> <true/> <key>LSSupportsOpeningDocumentsInPlace</key> <true/> <key>UIStatusBarHidden</key> <false/> </dict> </plist>

    Thanks again

  3. SelaseKay commented on Apr 17, 2026

    @SelaseKay
    Contributor

    Hi @kekene48, this is badly formatted. Kindly create a new repository I can clone to reproduce the issue.

  4. added
    blocked: customer-responseWaiting for customer response, e.g. more information was requested.
    and removed
    Needs AttentionThis issue needs maintainer attention.
    on Apr 17, 2026
  5. kekene48 commented on Apr 17, 2026

    @kekene48
    Author

    Hello @SelaseKay Here is a repo: https://github.com/kekene48/fcm-uiscene-repro

    Replaced the appdelegate.swift file and info.plist to the pre UIScene delegate adoption like my app

  6. kekene48 commented on Apr 20, 2026

    @kekene48
    Author

    Hello @SelaseKay Any update?

  7. SelaseKay commented on Apr 21, 2026

    @SelaseKay
    Contributor

    Hi @kekene48, your repo doesn't seem complete. I created a new flutter project with UI Scene adoption and onMessage was still triggered when I sent a notification. The issue likely related to your configuration.

  8. kekene48 commented on Apr 21, 2026

    @kekene48
    Author

    Hello @SelaseKay
    What is missing from my repo, so I can add it and push?

    my issue comes from migrating to the UiScene delegate, not from just using the UI Scene delegate for notification.

  9. SelaseKay commented on Apr 21, 2026

    @SelaseKay
    Contributor

    We’ll need a complete, reproducible example that we can clone and run in order to investigate this further. You don’t need to include your Firebase credentials—feel free to omit them, and we’ll substitute our own during testing. As things stand, it works fine in my case.

  10. kekene48 commented on Apr 21, 2026

    @kekene48
    Author

    That is what I did, I created a new flutter app, changed the AppDelegate.swift file to what I have, without UIScene adoption. Just added UIScene Adoption to the info.plist file. I did not add my firebase google service file

  11. SelaseKay commented on Apr 21, 2026

    @SelaseKay
    Contributor

    There's no reference or call to onMessage in your repo. I would expect that to be part as your issue made mention of it in reference to the issue you described. I followed your steps(created a new firebase project and configured firebase_messaging) but was unable to reproduce the issue. Could you try creating a new project locally to test if issue still persists? I suspect the issue is tied to your project.

  12. kekene48 commented on Apr 21, 2026

    @kekene48
    Author

    Okay.

  13. kekene48 commented on Apr 25, 2026

    @kekene48
    Author

    I figured out the issue, I was using a version of firebase messaging without scene delegate support

  14. locked and limited conversation to collaborators on Jul 3, 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

    blocked: customer-responseWaiting for customer response, e.g. more information was requested.platform: iosIssues / PRs which are specifically for iOS.plugin: messagingtype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions