[firebase_messaging][iOS] Tap on a notification whose push background-launched the app is lost: getInitialMessage() returns null and onMessageOpenedApp never fires
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ios
- 領域
- mobile
調査の方向性
Start with the two APIs the report names, getInitialMessage() and onMessageOpenedApp, and follow how the iOS side of firebase_messaging hands a notification tap to Dart. The log shows the tap arriving as a UNNotificationResponse on an already-running process, which is the path to trace. Done means a tap on a background-launched notification reaches Dart through one of those two APIs. Reproducing it needs a real iOS device and an APNs payload with content-available set to 1.
索引モデルが issue の本文から書いたものです。
説明
Is there an existing issue for this?
- I have searched the existing issues.
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
If an alert push that also carries content-available: 1 launches a terminated app in the background, and the user later taps that same notification, the tap never reaches Dart. getInitialMessage() resolves to null and onMessageOpenedApp is not emitted.
Reproducing the issue
Steps to reproduce
- Kill the app, or let iOS terminate it.
- Send an FCM message with a notification block and apns.payload.aps.content-available = 1.
- iOS shows the alert and launches the app in the background to deliver it. The scene connects in the background, the Dart side starts and calls getInitialMessage(), then iOS suspends the process.
- A few minutes later, tap the notification. iOS foregrounds the existing process and delivers the UNNotificationResponse.
Expected: onMessageOpenedApp emits the message, or getInitialMessage() returns it.
Actual: neither happens.
Firebase Core version
4.15.0
Flutter Version
3.44.0
Relevant Log Output
11:22:58.944 SpringBoard Request DUET delivers content-available push notification to application
11:22:58.956 dasd Sending request to open "<bundle>" with action(s): <UISHandleRemoteNotificationAction>
11:22:59.043 runningboard Creating and launching job ... (pid 2737, role: Background)
11:23:01.237 runningboard [pid 2737] Suspending task.
11:25:43.489 SpringBoard Received response to 85ED-AF6C for action com.apple.UNNotificationDefaultActionIdentifier
11:25:43.586 SpringBoard Sending action(s) in update: <UINotificationResponseAction> (to the existing pid 2737)
Flutter dependencies
Expand Flutter dependencies snippet
Dart SDK 3.12.0
Flutter SDK 3.44.0
dagning 6.3.1+62
dependencies:
- app_badge_plus 1.2.7 [flutter plugin_platform_interface]
- app_settings 7.0.0 [flutter plugin_platform_interface]
- archive 4.0.9 [path posix]
- built_collection 5.1.1
- cloud_firestore 6.10.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cloud_functions 6.5.0 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter]
- connectivity_plus 7.1.0 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection]
- crypto 3.0.7 [typed_data]
- cryptography_flutter_plus 3.0.0 [cryptography_plus flutter]
- cryptography_plus 3.0.0 [collection crypto ffi meta typed_data web]
- dagning_crypto 0.1.0 [flutter flutter_rust_bridge]
- dart_sentencepiece_tokenizer 1.3.1
- device_info_plus 12.4.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry]
- english_words 4.0.0 [string_scanner]
- eventide 2.3.0 [flutter meta plugin_platform_interface]
- extension_google_sign_in_as_googleapis_auth 2.0.13 [flutter google_sign_in googleapis_auth http meta]
- file_picker 10.3.10 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32 cross_file web dbus]
- firebase_app_check 0.4.8 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 6.7.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 4.15.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_messaging 16.7.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- firebase_storage 13.6.0 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter mime]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_gen 5.13.0+1 [flutter_gen_core args logging]
- flutter_local_notifications 19.5.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_windows flutter_local_notifications_platform_interface timezone]
- flutter_localizations 0.0.0 [flutter intl path]
- flutter_native_contact_picker_plus 1.3.1 [flutter plugin_platform_interface]
- flutter_native_splash 2.4.7 [args flutter flutter_web_plugins html image meta path universal_io xml yaml ansicolor]
- flutter_onnxruntime 1.6.4 [flutter flutter_web_plugins path_provider plugin_platform_interface web]
- flutter_rust_bridge 2.13.0 [args async build_cli_annotations collection logging meta path web]
- 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.4 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_timezone 4.1.1 [flutter flutter_web_plugins]
- freezed_annotation 3.1.0 [collection json_annotation meta]
- go_router 17.1.0 [collection flutter flutter_web_plugins logging meta]
- google_mlkit_text_recognition 0.15.1 [flutter google_mlkit_commons]
- google_sign_in 6.3.0 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- googleapis 13.2.0 [_discoveryapis_commons http]
- hive_ce 2.19.3 [meta crypto web isolate_channel json_annotation]
- hive_ce_flutter 2.3.4 [flutter hive_ce path_provider path]
- http 1.6.0 [async http_parser meta web]
- image_picker 1.2.1 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows]
- intl 0.20.2 [clock meta path]
- json_annotation 4.11.0 [meta]
- local_auth 2.3.0 [flutter local_auth_android local_auth_darwin local_auth_platform_interface local_auth_windows]
- lucide_icons_flutter 3.1.21 [flutter]
- meta 1.18.0
- mime 2.0.0
- mobile_scanner 7.4.0 [collection flutter flutter_web_plugins meta plugin_platform_interface web]
- package_info_plus 9.0.1 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32 clock]
- 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]
- pdf 3.12.0 [archive barcode bidi crypto image meta path_parsing vector_math xml]
- pdf_combiner 6.2.2 [flutter flutter_web_plugins path plugin_platform_interface web file_magic_number]
- pdfrx 2.2.24 [pdfrx_engine pdfium_flutter collection crypto ffi flutter http path path_provider rxdart synchronized url_launcher vector_math web yaml]
- provider 6.1.5+1 [collection flutter nested]
- qr_flutter 4.1.0 [flutter qr]
- share_plus 11.1.0 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi web win32]
- shared_preferences 2.5.5 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- sign_in_with_apple 6.1.4 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web]
- timezone 0.10.1 [http path]
- upgrader 13.5.0 [flutter html http os_detect package_info_plus shared_preferences url_launcher version xml]
- 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 1.1.1
- xml 6.6.1 [collection meta petitparser]
dev dependencies:
- build_runner 2.13.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]
- fake_async 1.3.3 [clock collection]
- flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver matcher]
- flutter_launcher_icons 0.14.4 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_lints 6.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]
- freezed 3.2.5 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation dart_style pub_semver]
- integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service]
- json_serializable 6.13.1 [analyzer async build build_config dart_style json_annotation meta path pub_semver pubspec_parse source_gen source_helper]
- path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface]
- plugin_platform_interface 2.1.8 [meta]
- test 1.31.0 [analyzer async boolean_selector collection coverage http_multi_server io matcher node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel test_api test_core typed_data web_socket_channel webkit_inspection_protocol yaml]
transitive dependencies:
- _discoveryapis_commons 1.0.7 [http http_parser meta]
- _fe_analyzer_shared 93.0.0 [meta source_span]
- _flutterfire_internals 1.3.77 [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
- args 2.7.0
- async 2.13.1 [collection meta]
- barcode 2.2.9 [meta qr]
- bidi 2.0.13
- boolean_selector 2.1.2 [source_span string_scanner]
- build 4.0.5 [analyzer crypto glob logging package_config path]
- build_cli_annotations 2.1.1 [args meta]
- build_config 1.3.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_value 8.12.5 [built_collection collection fixnum meta]
- characters 1.4.1
- checked_yaml 2.0.4 [json_annotation source_span yaml]
- cli_config 0.2.0 [args yaml]
- cli_util 0.4.2 [meta path]
- clock 1.1.2
- cloud_firestore_platform_interface 8.0.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 5.7.3 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- cloud_functions_platform_interface 6.0.7 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 5.1.13 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins web]
- code_assets 1.0.0 [collection hooks]
- code_builder 4.11.1 [built_collection built_value collection matcher meta]
- collection 1.19.1
- color 3.0.0
- connectivity_plus_platform_interface 2.1.0 [flutter meta plugin_platform_interface]
- convert 3.1.2 [typed_data]
- coverage 1.15.0 [args cli_config glob logging meta package_config path source_maps stack_trace vm_service yaml]
- cross_file 0.3.5+2 [meta web]
- csslib 1.0.2 [source_span]
- dart_style 3.1.7 [analyzer args collection package_config path pub_semver source_span yaml]
- dartx 1.2.0 [characters collection crypto meta path time]
- dbus 0.7.12 [args ffi meta xml]
- device_info_plus_platform_interface 7.0.3 [flutter meta plugin_platform_interface]
- ffi 2.2.0
- file 7.0.1 [meta path]
- file_magic_number 2.1.0 [flutter web mime cross_file]
- file_selector_linux 0.9.4 [cross_file file_selector_platform_interface flutter]
- file_selector_macos 0.9.5 [cross_file file_selector_platform_interface flutter]
- file_selector_platform_interface 2.7.0 [cross_file flutter http plugin_platform_interface]
- file_selector_windows 0.9.3+5 [cross_file file_selector_platform_interface flutter]
- firebase_app_check_platform_interface 0.4.2+1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_app_check_web 0.2.6+1 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins web]
- firebase_auth_platform_interface 9.1.0 [_flutterfire_internals collection firebase_core flutter http meta plugin_platform_interface]
- firebase_auth_web 6.3.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_platform_interface 8.1.1 [collection flutter meta plugin_platform_interface]
- firebase_core_web 3.12.0 [firebase_core_platform_interface meta web]
- firebase_messaging_platform_interface 4.10.0 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 4.2.5 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web]
- firebase_storage_platform_interface 6.0.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 3.11.13 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http meta web]
- fixnum 1.1.1
- flutter_gen_core 5.13.0+1 [meta path yaml mime xml dartx color collection json_annotation glob logging dart_style archive args pub_semver vector_graphics_compiler image_size_getter image]
- 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_plugin_android_lifecycle 2.0.34 [flutter]
- 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]
- frontend_server_client 4.0.0 [async path]
- fuchsia_remote_debug_protocol 0.0.0 [process vm_service meta]
- glob 2.1.3 [async collection file path string_scanner]
- google_identity_services_web 0.3.3+1 [meta web]
- google_mlkit_commons 0.11.1 [flutter]
- google_sign_in_android 6.2.1 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.9.0 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.5.0 [flutter plugin_platform_interface]
- google_sign_in_web 0.12.4+4 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web]
- googleapis_auth 2.0.0 [args crypto google_identity_services_web http http_parser]
- graphs 2.3.2 [collection]
- hashcodes 2.0.0
- hooks 1.0.2 [collection crypto logging meta pub_semver yaml]
- html 0.15.6 [csslib source_span]
- http_multi_server 3.2.2 [async]
- http_parser 4.1.2 [collection source_span string_scanner typed_data]
- image 4.8.0 [archive meta xml]
- image_picker_android 0.8.13+15 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 3.1.1 [flutter flutter_web_plugins image_picker_platform_interface mime web]
- image_picker_ios 0.8.13+6 [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+1 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_platform_interface 2.11.1 [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]
- image_size_getter 2.4.1 [collection hashcodes meta]
- io 1.0.5 [meta path string_scanner]
- isolate_channel 0.6.1 [meta]
- js 0.6.7 [meta]
- 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 6.1.0
- local_auth_android 1.0.56 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface]
- local_auth_darwin 1.6.1 [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]
- native_toolchain_c 0.17.6 [code_assets glob hooks logging meta pub_semver]
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- node_preamble 2.0.2
- objective_c 9.3.0 [code_assets collection ffi hooks logging native_toolchain_c pub_semver]
- os_detect 2.0.3 [meta web]
- package_config 2.2.0 [path]
- 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.23 [flutter path_provider_platform_interface]
- path_provider_foundation 2.6.0 [ffi flutter objective_c path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_windows 2.3.0 [ffi flutter path path_provider_platform_interface]
- pdfium_dart 0.1.3 [archive ffi http path]
- pdfium_flutter 0.1.9 [pdfium_dart ffi flutter path]
- pdfrx_engine 0.3.9 [pdfium_dart collection crypto ffi http path rxdart synchronized vector_math archive image]
- petitparser 7.0.2 [meta collection]
- platform 3.1.6
- pool 1.5.2 [async stack_trace]
- posix 6.5.0 [ffi meta path]
- process 5.0.5 [file path platform]
- pub_semver 2.2.0 [collection]
- pubspec_parse 1.5.0 [checked_yaml collection json_annotation pub_semver yaml]
- qr 3.0.2 [meta]
- rxdart 0.28.0
- share_plus_platform_interface 6.1.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- shared_preferences_android 2.4.23 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.5.6 [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.2 [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_packages_handler 3.0.2 [path shelf shelf_static]
- shelf_static 1.1.3 [convert http_parser mime path shelf]
- shelf_web_socket 3.0.0 [shelf stream_channel web_socket_channel]
- sign_in_with_apple_platform_interface 1.1.0 [flutter plugin_platform_interface meta]
- sign_in_with_apple_web 2.1.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface]
- sky_engine 0.0.0
- source_gen 4.2.2 [analyzer async build dart_style glob path pub_semver source_span yaml]
- source_helper 1.3.11 [analyzer source_gen]
- source_map_stack_trace 2.1.2 [path source_maps stack_trace]
- source_maps 0.10.13 [source_span]
- source_span 1.10.2 [collection path term_glyph]
- stack_trace 1.12.1 [path]
- stream_channel 2.1.4 [async]
- stream_transform 2.1.1
- string_scanner 1.4.1 [source_span]
- sync_http 0.3.1
- synchronized 3.4.0
- term_glyph 1.2.2
- test_api 0.7.11 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- test_core 0.6.17 [analyzer args async boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel test_api vm_service yaml]
- time 2.1.6 [clock]
- typed_data 1.4.0 [collection]
- universal_io 2.3.1 [collection meta typed_data]
- url_launcher_android 6.3.29 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.4.1 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.2 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.5 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.4.2 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.5 [flutter url_launcher_platform_interface]
- vector_graphics 1.1.21 [flutter http vector_graphics_codec]
- vector_graphics_codec 1.1.13
- vector_graphics_compiler 1.2.0 [args meta path path_parsing vector_graphics_codec xml]
- vector_math 2.2.0
- version 3.0.2
- vm_service 15.0.2
- watcher 1.2.1 [async path]
- web_socket 1.0.1 [web]
- web_socket_channel 3.0.3 [async crypto stream_channel web web_socket]
- webdriver 3.1.0 [matcher path stack_trace sync_http]
- webkit_inspection_protocol 1.2.1 [logging]
- win32 5.15.0 [ffi]
- win32_registry 2.1.0 [ffi meta win32]
- xdg_directories 1.1.0 [meta path]
- yaml 3.1.3 [collection source_span string_scanner]
Additional context and comments
Cause (FLTFirebaseMessagingPlugin.m, 16.7.0)
- Background launch: the scene connects (_sceneDidConnect = YES) with no notificationResponse. Then application:didReceiveRemoteNotification:fetchCompletionHandler: runs, and this branch treats the content-available delivery as the launch notification:
if (_sceneDidConnect && !_initialNotificationGathered && _initialNotification == nil) {
_initialNotification = notificationDict;
_initialNotificationID = userInfo[@"gcm.message_id"];
_initialNotificationGathered = YES;
[self initialNotificationCallback];
}
Nothing has been tapped yet, so _notificationOpenedAppID is nil. The pending getInitialMessage() is answered by copyInitialNotification, which returns nil because the two ids differ.
2. The tap: userNotificationCenter:didReceiveNotificationResponse: sets _notificationOpenedAppID to the same id. The new re-delivery (if (_initialNotification != nil && [_initialNotificationID isEqualToString:_notificationOpenedAppID]) { ... initialNotificationCallback }) does nothing, because _initialNotificationResult was already consumed. Then
if (_notificationOpenedAppID != nil &&
![_initialNotificationID isEqualToString:_notificationOpenedAppID]) {
[_channel invokeMethod:@"Messaging#onMessageOpenedApp" arguments:notificationDict];
}
skips onMessageOpenedApp, because the ids are equal. The tap is dropped.
Suggested fix
Either of these would do:
- Don't apply the "this push launched the app" branch when UIApplication.sharedApplication.applicationState == UIApplicationStateBackground. A content-available background launch is not a user launch.
- Or record whether the initial notification was actually returned to Dart. In didReceiveNotificationResponse, emit onMessageOpenedApp unless getInitialMessage() has already delivered that same id.
Workaround we use
Our AppDelegate (still the UNUserNotificationCenter delegate) overrides userNotificationCenter(_:didReceive:withCompletionHandler:). It queues the FCM payload for Dart over its own method channel and then calls super. On the Dart side we de-duplicate by messageId against getInitialMessage() and onMessageOpenedApp.
- 主要言語
- Dart
- スター
- 9.3k
- フォーク
- 4.1k
- 平均マージ
- 2日 7時間
- マージ済み PR(30日)
- 47
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/flutterfire のほかの issue
-
🚀 [firebase_core] Bump Firebase Android SDK (35.0.0 → 35.0.1)対応中かも @SelaseKay が今日担当しました。 オープンNeeds Attention type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 20/100
firebase/flutterfire#18807 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[firebase_auth]: authStateChanges() never emits null when the user is force-signed-out before the stream is listened to (iOS, macOS, Android)対応中かも @JulianPscheid が 2 日前に担当しました。 オープンNeeds Attention platform: android platform: ios platform: macos plugin: auth reproduced type: bug
難易度 4/5 1〜2日 初心者へのやさしさ 15/100
firebase/flutterfire#18796 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
blocked: customer-response Needs Attention platform: ios plugin: messaging type: bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
firebase/flutterfire#18776 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
[📚] Remote Config Windows Support still N/A on Readme対応中かも @nightcityblade が 8 日前に担当しました。 オープンblocked: customer-response good first issue Needs Attention platform: windows plugin: remote_config type: documentation
難易度 1/5 1時間未満 初心者へのやさしさ 30/100
firebase/flutterfire#18763 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[cloud_firestore]: a snapshots() listener cancelled while it registers is never removed natively対応中かも @chiliec が 20 日前に担当しました。 オープンNeeds Attention platform: android platform: ios platform: macos plugin: cloud_firestore reproduced type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
firebase/flutterfire#18724 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
firebase/flutterfire の issue をすべて見る
似ている issue
-
c: proposal p: go_router package team-ecosystem
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
flutter/flutter#194542 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
famedly/matrix-dart-sdk#2524 ·
メンテナーはふだん 1 日以内に返信
-
Documentation
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Kazakh (kk_KZ) and Georgian (ka_GE) system locales get English instead of the shipped translationsオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
area: docs eco: dart good first issue help wanted lane: free-agent roadmap size: XS type: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
arminazimi/evergreen#430 ·
メンテナーはふだん 1 日以内に返信