firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.61k stars 3.95k forks source link

[firebase_messaging]: Scheduled notifications in Recipient time zone on iOS #13185

Closed Goolpe closed 1 week ago

Goolpe commented 4 weeks ago

Is there an existing issue for this?

Which plugins are affected?

Messaging

Which platforms are affected?

iOS

Description

This issue is similar to https://github.com/firebase/flutterfire/issues/1509 and https://github.com/invertase/react-native-firebase/issues/3486

We have been experiencing an issue since June 10, 2023, which has recently become more concerning due to the increasing number of users. Specifically, we've observed significant traffic spikes on our backend and Amplitude dashboards every day at 9:00 AM CET. During these peaks, a large number of users are opening our app simultaneously.

Initially, we suspected external API requests, but our backend team has confirmed that the traffic is originating from within the app. The only plausible explanation we can think of is related to notifications.

We have noticed similar spikes with previous messaging setups, and since June 10, 2023, we have been running active firebase messaging campaigns for both iOS and Android from Firebase Console. These campaigns are scheduled for the evening based on the recipient's time zone. However, only iOS appears to be experiencing these spikes—Android does not have any issues.

We had the same response as https://github.com/invertase/react-native-firebase/issues/3486 from Firebase Support Team

  1. No logic to clear local notifications in the app
  2. Background Modes > Remote Notifications enabled
  3. Swizzling enabled (Didn't disable it in info.plist), but [[FIRMessaging messaging] appDidReceiveMessage:userInfo] is not implemented manually
  4. The app is terminated because we received a lot of start_session events, which means that user opens the app from scratch
Снимок экрана 2024-08-15 в 13 12 13 Снимок экрана 2024-08-15 в 13 04 25 Снимок экрана 2024-08-15 в 13 05 57

Reproducing the issue

we are using default setup for notifications from firebase_messaging AppDelegate.swift

import UIKit
import Flutter
import flutter_unity_widget
import flutter_local_notifications

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    InitUnityIntegrationWithOptions(argc: CommandLine.argc, argv: CommandLine.unsafeArgv, launchOptions)
    GeneratedPluginRegistrant.register(with: self)

    if #available(iOS 10.0, *) {
      UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
    }

    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);

final settings = await FirebaseMessaging.instance.requestPermission(
      alert: true,
      announcement: false,
      badge: true,
      carPlay: false,
      criticalAlert: false,
      provisional: false,
      sound: true,
    );

    final apnsToken = await FirebaseMessaging.instance.getAPNSToken();

    FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
    FirebaseMessaging.onMessageOpenedApp.listen(
      _handleMessageOpenedBackground,
    );

    await FirebaseMessaging.instance
        .setForegroundNotificationPresentationOptions(alert: true, badge: true, sound: true);

    final initialMessage = await FirebaseMessaging.instance.getInitialMessage();
    if (initialMessage != null) {
      _handleMessage(initialMessage);
    }

    FirebaseMessaging.onMessage.listen(_onForegroundMessage);
    FirebaseMessaging.onMessageOpenedApp.listen(_handleMessage);

Firebase Core version

3.0.0

Flutter Version

3.22.2

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
```yaml Dart SDK 3.4.3 Flutter SDK 3.22.2 praktika_ai_flutter 3.16.0+610 dependencies: - adjust_sdk 4.38.1 [flutter meta] - alice 0.4.1 [flutter http dio rxdart path_provider permission_handler package_info_plus open_filex share_plus chopper collection url_launcher] - amplitude_flutter 3.16.2 [flutter flutter_web_plugins js] - animated_text_kit 4.2.2 [flutter characters] - app_settings 5.1.1 [flutter plugin_platform_interface] - app_tracking_transparency 2.0.5 [flutter] - async 2.11.0 [collection meta] - audio_session 0.1.21 [flutter flutter_web_plugins rxdart meta] - auto_size_text 3.0.0 [flutter] - cached_network_image 3.3.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - camera 0.10.6 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle] - carousel_slider 4.2.1 [flutter] - chopper 7.4.0 [equatable http logging meta qs_dart] - connectivity_plus 4.0.2 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm] - cupertino_icons 1.0.8 - custom_refresh_indicator 3.1.0 [flutter meta] - customer_io 1.3.2 [flutter plugin_platform_interface] - device_info_plus 10.1.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry] - disk_space 0.2.1 [flutter] - easy_localization 3.0.7 [flutter shared_preferences intl args path easy_logger flutter_localizations] - equatable 2.0.5 [collection meta] - f_logs 2.0.1 [flutter sembast path_provider intl xxtea meta path stack_trace] - facebook_app_events 0.18.3 [flutter] - firebase_analytics 11.2.0 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 5.1.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 3.3.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 4.0.3 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 15.0.3 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.10.0+4 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_remote_config 5.0.3 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_animate 4.5.0 [flutter flutter_shaders] - flutter_archive 6.0.0 [flutter] - flutter_facebook_auth 5.0.8 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web facebook_auth_desktop] - flutter_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml] - flutter_local_notifications 16.3.3 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_native_splash 2.2.16 [args flutter flutter_web_plugins js html image meta path universal_io xml yaml] - flutter_sound 9.2.13 [path_provider recase uuid provider path synchronized logger flutter flutter_sound_platform_interface flutter_sound_web] - flutter_sound_platform_interface 9.2.13 [flutter meta plugin_platform_interface logger] - flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler] - flutter_unity_widget 2022.2.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle stream_transform plugin_platform_interface webview_flutter webview_flutter_web] - get 4.6.6 [flutter] - google_fonts 4.0.5 [flutter http path_provider crypto] - google_sign_in 5.4.4 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - http 0.13.6 [async http_parser meta] - in_app_review 2.0.9 [flutter in_app_review_platform_interface] - in_app_update 4.2.3 [flutter] - internet_connection_checker 1.0.0+1 - intl_phone_field 3.2.0 [flutter] - json_annotation 4.9.0 [meta] - just_audio 0.9.39 [just_audio_platform_interface just_audio_web audio_session rxdart path path_provider async uuid crypto meta flutter] - just_waveform 0.0.5 [flutter path path_provider] - language_picker 0.4.4 [flutter recase] - lottie 3.1.2 [archive flutter http path vector_math] - mime_type 1.0.0 - package_info_plus 6.0.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32] - path_provider 2.1.3 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - percent_indicator 4.2.3 [flutter] - permission_handler 11.3.1 [flutter meta permission_handler_android permission_handler_apple permission_handler_html permission_handler_windows permission_handler_platform_interface] - purchases_flutter 6.30.1 [flutter freezed_annotation json_annotation] - responsive_framework 0.2.0 [flutter collection] - scroll_to_index 3.0.1 [flutter] - sembast 3.7.1+2 [meta path synchronized] - share_plus 7.2.2 [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 win32] - shared_preferences 2.2.3 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shimmer 2.0.0 [flutter] - sign_in_with_apple 4.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - simple_gradient_text 1.3.0 [flutter] - simple_html_css 5.0.0 [flutter xml] - simple_ripple_animation 0.0.9 [flutter hyper_lint] - smooth_page_indicator 1.1.0 [flutter] - social_share 2.3.1 [flutter path_provider] - socket_io_client 1.0.2 [socket_io_common js logging] - stack_trace 1.11.1 [path] - store_checker 1.4.0 [flutter] - system_info_plus 0.0.5 [flutter] - table_calendar 3.1.2 [flutter intl simple_gesture_detector] - translator 1.0.0 [http] - upgrader 10.3.0 [flutter device_info_plus html http os_detect package_info_plus shared_preferences url_launcher version xml] - url_launcher 6.3.0 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - uuid 3.0.7 [crypto] - version 3.0.2 - video_player 2.8.6 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - wakelock_plus 1.2.5 [flutter flutter_web_plugins meta wakelock_plus_platform_interface win32 dbus package_info_plus web] - webview_flutter 4.8.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] dev dependencies: - build_runner 2.4.11 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - chopper_generator 7.4.0 [analyzer build built_collection chopper code_builder dart_style logging meta source_gen yaml qs_dart collection] - dart_code_metrics 5.7.6 [analyzer analyzer_plugin ansicolor args collection crypto dart_code_metrics_presets file glob html http meta path platform pub_updater source_span uuid xml yaml] - dependency_validator 3.2.3 [args build_config checked_yaml glob io json_annotation logging package_config path pub_semver pubspec_parse yaml] - flutter_lints 1.0.4 [lints] - flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service] - json_serializable 6.8.0 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - mocktail 1.0.4 [collection matcher test_api] - mocktail_image_network 1.2.0 [mocktail] - spider 4.2.2 [path yaml args dart_style logging watcher http html sprintf meta ansicolor collection] - swagger_dart_code_generator 2.15.2 [build path markdown recase json_annotation universal_io collection dart_style code_builder http yaml] - swagger_fetcher 1.0.0 [dio path] - test 1.25.2 [analyzer async boolean_selector collection coverage http_multi_server io js 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] - translate_util 1.0.0 [dio path translator yaml] dependency overrides: - http 0.13.6 [async http_parser meta] - intl 0.18.1 [clock meta path] transitive dependencies: - _fe_analyzer_shared 61.0.0 [meta] - _flutterfire_internals 1.3.40 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 5.13.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - analyzer_plugin 0.11.2 [analyzer collection dart_style pub_semver yaml] - ansicolor 2.0.2 - archive 3.6.1 [crypto path] - args 2.5.0 - boolean_selector 2.1.1 [source_span string_scanner] - build 2.4.1 [analyzer async convert crypto glob logging meta package_config path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 4.0.2 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.4.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml] - build_runner_core 7.3.1 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.9.2 [built_collection collection fixnum meta] - cached_network_image_platform_interface 4.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.2.0 [cached_network_image_platform_interface flutter flutter_cache_manager] - camera_android 0.10.9+8 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform] - camera_avfoundation 0.9.16 [camera_platform_interface flutter stream_transform] - camera_platform_interface 2.7.4 [cross_file flutter plugin_platform_interface stream_transform] - camera_web 0.3.3 [camera_platform_interface flutter flutter_web_plugins stream_transform] - characters 1.3.0 - checked_yaml 2.0.3 [json_annotation source_span yaml] - cli_util 0.3.5 [meta path] - clock 1.1.1 - code_builder 4.10.0 [built_collection built_value collection matcher meta] - collection 1.18.0 - connectivity_plus_platform_interface 1.2.4 [flutter meta plugin_platform_interface] - convert 3.1.1 [typed_data] - coverage 1.8.0 [args logging package_config path source_maps stack_trace vm_service] - cross_file 0.3.4+1 [meta web] - crypto 3.0.3 [typed_data] - csslib 1.0.0 [source_span] - dart_code_metrics_presets 1.8.0 - dart_style 2.3.2 [analyzer args path pub_semver source_span] - dbus 0.7.10 [args ffi meta xml] - device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface] - dio 5.4.0 [async http_parser meta path] - easy_logger 0.0.2 [flutter] - facebook_auth_desktop 0.0.9 [flutter http flutter_secure_storage flutter_facebook_auth_platform_interface] - fake_async 1.3.1 [clock collection] - ffi 2.1.2 - file 6.1.4 [meta path] - firebase_analytics_platform_interface 4.2.0 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.9 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins] - firebase_auth_platform_interface 7.4.2 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.12.4 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web] - firebase_core_platform_interface 5.2.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.17.4 [firebase_core_platform_interface flutter flutter_web_plugins meta web] - firebase_crashlytics_platform_interface 3.6.39 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.5.41 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.8.11 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web] - firebase_performance_platform_interface 0.1.4+40 [_flutterfire_internals firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.6+12 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins] - firebase_remote_config_platform_interface 1.4.39 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.6.11 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins] - fixnum 1.1.0 - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_facebook_auth_platform_interface 4.1.1 [flutter plugin_platform_interface] - flutter_facebook_auth_web 4.1.1 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface] - flutter_local_notifications_linux 4.0.0+1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories] - flutter_local_notifications_platform_interface 7.1.0 [flutter plugin_platform_interface] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_plugin_android_lifecycle 2.0.20 [flutter] - flutter_secure_storage 8.1.0 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta] - flutter_secure_storage_linux 1.2.1 [flutter flutter_secure_storage_platform_interface] - flutter_secure_storage_macos 3.1.2 [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 2.1.1 [flutter flutter_secure_storage_platform_interface] - flutter_shaders 0.1.2 [flutter vector_math] - flutter_sound_web 9.2.13 [flutter_sound_platform_interface flutter logger flutter_web_plugins meta js] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - freezed_annotation 2.4.1 [collection json_annotation meta] - frontend_server_client 4.0.0 [async path] - glob 2.1.2 [async collection file path string_scanner] - google_sign_in_android 6.1.24 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.7.6 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.5 [flutter plugin_platform_interface] - google_sign_in_web 0.10.2+1 [flutter flutter_web_plugins google_sign_in_platform_interface js] - graphs 2.3.1 [collection] - html 0.15.4 [csslib source_span] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - hyper_lint 0.0.2 [flutter] - image 3.3.0 [archive meta xml] - in_app_review_platform_interface 2.0.5 [flutter url_launcher plugin_platform_interface platform] - io 1.0.4 [meta path string_scanner] - js 0.6.7 [meta] - just_audio_platform_interface 4.3.0 [flutter plugin_platform_interface] - just_audio_web 0.4.11 [just_audio_platform_interface flutter flutter_web_plugins web] - leak_tracker 10.0.4 [clock collection meta path vm_service] - leak_tracker_flutter_testing 3.0.3 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 3.0.1 [leak_tracker matcher meta] - lints 1.0.1 - logger 1.4.0 - logging 1.2.0 - markdown 7.2.2 [args meta] - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.8.0 [collection] - meta 1.12.0 - mime 1.0.5 - nested 1.0.0 [flutter] - nm 0.5.0 [dbus] - node_preamble 2.0.2 - octo_image 2.0.0 [flutter] - open_filex 4.4.0 [flutter ffi] - os_detect 2.0.1 - package_config 2.1.0 [path] - package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - path 1.9.0 - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.5 [flutter path_provider_platform_interface] - path_provider_foundation 2.4.0 [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.2.1 [ffi flutter path path_provider_platform_interface win32] - permission_handler_android 12.0.7 [flutter permission_handler_platform_interface] - permission_handler_apple 9.4.5 [flutter permission_handler_platform_interface] - permission_handler_html 0.1.1 [flutter flutter_web_plugins permission_handler_platform_interface] - permission_handler_platform_interface 4.2.1 [flutter meta plugin_platform_interface] - permission_handler_windows 0.2.1 [flutter permission_handler_platform_interface] - petitparser 6.0.2 [meta] - platform 3.1.4 - plugin_platform_interface 2.1.8 [meta] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - provider 6.1.2 [collection flutter nested] - pub_semver 2.1.4 [collection meta] - pub_updater 0.3.1 [http json_annotation process pub_semver] - pubspec_parse 1.3.0 [checked_yaml collection json_annotation pub_semver yaml] - qs_dart 1.2.1 [collection equatable meta recursive_regex weak_map] - recase 4.1.0 - recursive_regex 1.0.0 [meta] - rxdart 0.27.7 - share_plus_platform_interface 3.4.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences_android 2.2.3 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.4.0 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.3.2 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.3.2 [flutter plugin_platform_interface] - shared_preferences_web 2.3.0 [flutter flutter_web_plugins shared_preferences_platform_interface web] - shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.4.1 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.2 [path shelf shelf_static] - shelf_static 1.1.2 [convert http_parser mime path shelf] - shelf_web_socket 1.0.4 [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 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js] - simple_gesture_detector 0.2.1 [flutter] - sky_engine 0.0.99 - socket_io_common 1.0.1 [logging] - source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml] - source_helper 1.3.4 [analyzer collection source_gen] - source_map_stack_trace 2.1.1 [path source_maps stack_trace] - source_maps 0.10.12 [source_span] - source_span 1.10.0 [collection path term_glyph] - sprintf 7.0.0 - sqflite 2.3.3+1 [flutter sqflite_common path] - sqflite_common 2.5.4 [synchronized path meta] - stream_channel 2.1.2 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - synchronized 3.1.0+1 - term_glyph 1.2.1 - test_api 0.7.0 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - test_core 0.6.0 [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] - timezone 0.9.3 [path] - timing 1.0.1 [json_annotation] - typed_data 1.3.2 [collection] - universal_io 2.2.2 [collection meta typed_data] - url_launcher_android 6.3.3 [flutter url_launcher_platform_interface] - url_launcher_ios 6.3.0 [flutter url_launcher_platform_interface] - url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.2.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface] - url_launcher_web 2.3.1 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface] - vector_graphics 1.1.11+1 [flutter http vector_graphics_codec] - vector_graphics_codec 1.1.11+1 - vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - video_player_android 2.4.17 [flutter video_player_platform_interface] - video_player_avfoundation 2.6.1 [flutter video_player_platform_interface] - video_player_platform_interface 6.2.2 [flutter plugin_platform_interface] - video_player_web 2.2.0 [flutter flutter_web_plugins video_player_platform_interface] - vm_service 14.2.1 - wakelock_plus_platform_interface 1.2.1 [flutter plugin_platform_interface meta] - watcher 1.1.0 [async path] - weak_map 3.0.1 - web 0.5.1 - web_socket_channel 2.4.5 [async crypto stream_channel web] - webkit_inspection_protocol 1.2.1 [logging] - webview_flutter_android 3.16.4 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 2.10.0 [flutter meta plugin_platform_interface] - webview_flutter_web 0.2.2+4 [flutter flutter_web_plugins webview_flutter_platform_interface] - webview_flutter_wkwebview 3.13.1 [flutter path webview_flutter_platform_interface] - win32 5.5.1 [ffi] - win32_registry 1.1.3 [ffi win32] - xdg_directories 1.0.4 [meta path] - xml 6.5.0 [collection meta petitparser] - xxtea 2.1.0 - yaml 3.1.2 [collection source_span string_scanner] ```

Additional context and comments

No response

russellwheatley commented 4 weeks ago

Hi @Goolpe - It is unclear to me what the issue is exactly. Could you explicitly provide expected vs actual behaviour?

Goolpe commented 4 weeks ago

We are sending scheduled notifications through the Firebase Console, configured to be sent at 21:00 according to the recipient's time zone. Firebase Support Team said, "FCM servers are actually sending a data message up to 26 hours in advance, and the message is stored on target devices. The FCM SDK then schedules a local notification which is displayed at the scheduled recipient time."

Expected Behavior: Every user should receive the notification at 21:00 in their local time zone.

Actual Behavior: While Android works as expected, on iOS, all users are receiving the notifications at approximately 9:00 AM Central European Time (CET) instead of their local time.

Lyokone commented 1 week ago

Hello @Goolpe, sorry for the late response. We are not doing any extra processing on the FlutterFire side to set the Device time. I'm not sure how to help you here. What has changed on your side on June 10, 2023?

Goolpe commented 1 week ago

Nothing was changed, I think it was started from the beginning of firebase_messaging implementation. We've tried scheduled notifications once earlier and the same peak on the graph appeared. The company decided to switch to another service, so I think we can close the issue, if someone has the same problem, he can reopen it.