I’m encountering a build error when trying to debug an application using firebase_messaging on an iOS device. The error message suggests an issue with the inclusion of non-modular headers inside the framework module. This error prevents the application from being built and run on iOS devices.
Reproducing the issue
1. Set up a Flutter project with firebase_messaging as a dependency.
2. Attempt to debug or run the app on an iOS device using Xcode or through Flutter commands.
3. The build fails with the above-mentioned lexical or preprocessor issue.
Firebase Core version
3.3.0
Flutter Version
3.24.3
Relevant Log Output
Launching lib/main.dart on User’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: XXXXXXX
Xcode build done. 15.0s
Failed to build iOS app
Could not build the precompiled application for the device.
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_messaging.FLTFirebaseMessagingPlugin': '/Users/user/dev/babyscripts/babyscripts-2.0-monorepo/apps/myjourney/ios/Pods/Headers/Public/Firebase/Firebase.h'
/Users/user/.pub-cache/hosted/pub.dev/firebase_messaging-15.1.2/ios/Classes/FLTFirebaseMessagingPlugin.h:11:8
Error launching application on User’s iPhone.
Is there an existing issue for this?
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
I’m encountering a build error when trying to debug an application using firebase_messaging on an iOS device. The error message suggests an issue with the inclusion of non-modular headers inside the framework module. This error prevents the application from being built and run on iOS devices.
Reproducing the issue
Firebase Core version
3.3.0
Flutter Version
3.24.3
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippet```yaml dependencies: - auth0_flutter 1.7.2 [auth0_flutter_platform_interface flutter flutter_web_plugins js] - build_runner 2.4.12 [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] - cached_network_image 3.4.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - camera 0.11.0+2 [camera_android_camerax camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle] - collection 1.18.0 - connectivity_plus 6.0.5 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection] - crypto 3.0.5 [typed_data] - cupertino_icons 1.0.8 - datadog_flutter_plugin 2.7.0 [flutter flutter_web_plugins plugin_platform_interface json_annotation uuid meta] - datadog_tracking_http_client 2.2.0 [flutter datadog_flutter_plugin uuid http] - datadog_webview_tracking 2.0.2 [flutter datadog_flutter_plugin webview_flutter webview_flutter_android webview_flutter_wkwebview] - debounce_throttle 2.0.0 [meta simple_observable] - device_info_plus 10.1.2 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry] - dio 5.7.0 [async http_parser meta path dio_web_adapter] - dropdown_button2 2.3.9 [flutter meta] - equatable 2.0.5 [collection meta] - exif 3.3.0 [args collection convert json_annotation sprintf] - firebase_core 3.5.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_messaging 15.1.2 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - fl_chart 0.63.0 [equatable flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_apns_connector 0.0.1 [flutter plugin_platform_interface] - flutter_blue_plus 1.31.13 [flutter] - flutter_dotenv 5.1.0 [flutter] - flutter_hooks 0.20.5 [flutter] - flutter_html 3.0.0-beta.2 [html csslib collection list_counter flutter] - flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml] - flutter_local_notifications 17.2.3 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_riverpod 2.5.1 [collection flutter meta riverpod state_notifier] - flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - flutter_widget_from_html_core 0.14.12 [csslib flutter html logging] - fwfh_cached_network_image 0.14.3 [cached_network_image flutter flutter_cache_manager flutter_widget_from_html_core] - fwfh_chewie 0.14.8 [chewie flutter flutter_widget_from_html_core video_player] - fwfh_svg 0.8.3 [flutter flutter_svg flutter_widget_from_html_core] - fwfh_url_launcher 0.9.1 [flutter flutter_widget_from_html_core url_launcher] - fwfh_webview 0.14.8 [flutter flutter_widget_from_html_core logging webview_flutter webview_flutter_android webview_flutter_wkwebview] - go_router 10.2.0 [collection flutter flutter_web_plugins logging meta] - hooks_riverpod 2.5.2 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier] - i_health_blood_pressure 0.0.1 [flutter plugin_platform_interface permission_handler] - image 4.2.0 [archive meta xml] - intl 0.19.0 [clock meta path] - lokalise_flutter_sdk 1.3.3 [dart_style flutter intl intl_translation yaml path petitparser logger shared_preferences http archive package_info_plus] - mask_text_input_formatter 2.9.0 [flutter] - mobile_scanner 5.2.3 [flutter flutter_web_plugins plugin_platform_interface web] - package_info_plus 8.0.2 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32 clock] - path 1.9.0 - path_provider 2.1.4 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - permission_handler 11.3.1 [flutter meta permission_handler_android permission_handler_apple permission_handler_html permission_handler_windows permission_handler_platform_interface] - rxdart 0.27.7 - shared_preferences 2.3.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shimmer 3.0.0 [flutter] - universal_html 2.2.4 [async csslib charcode collection html meta source_span typed_data universal_io] - 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] dev dependencies: - flutter_lints 2.0.3 [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] - mockito 5.4.4 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] dependency overrides: - archive 3.6.1 [crypto path] - camera_android_camerax 0.6.7 [async camera_platform_interface flutter meta stream_transform] - permission_handler_html 0.1.3+2 [flutter flutter_web_plugins permission_handler_platform_interface web] - web 1.0.0 transitive dependencies: - _fe_analyzer_shared 72.0.0 [meta] - _flutterfire_internals 1.3.43 [collection firebase_core firebase_core_platform_interface flutter meta] - _macros 0.3.2 - analyzer 6.7.0 [_fe_analyzer_shared collection convert crypto glob macros meta package_config path pub_semver source_span watcher yaml] - args 2.5.0 - async 2.11.0 [collection meta] - auth0_flutter_platform_interface 1.7.0 [flutter plugin_platform_interface] - 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.2 [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.1.1 [flutter flutter_cache_manager] - cached_network_image_web 1.3.1 [cached_network_image_platform_interface flutter flutter_cache_manager web] - camera_avfoundation 0.9.17+3 [camera_platform_interface flutter stream_transform] - camera_platform_interface 2.8.0 [cross_file flutter plugin_platform_interface stream_transform] - camera_web 0.3.5 [camera_platform_interface flutter flutter_web_plugins stream_transform web] - characters 1.3.0 - charcode 1.3.1 - checked_yaml 2.0.3 [json_annotation source_span yaml] - chewie 1.8.5 [cupertino_icons flutter provider video_player wakelock_plus] - cli_util 0.4.1 [meta path] - clock 1.1.1 - code_builder 4.10.0 [built_collection built_value collection matcher meta] - connectivity_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - convert 3.1.1 [typed_data] - cross_file 0.3.4+2 [meta web] - csslib 0.17.3 [source_span] - dart_style 2.3.7 [analyzer args collection package_config path pub_semver source_span] - dbus 0.7.10 [args ffi meta xml] - device_info_plus_platform_interface 7.0.1 [flutter meta plugin_platform_interface] - dio_web_adapter 2.0.0 [dio http_parser meta web] - fake_async 1.3.1 [clock collection] - ffi 2.1.3 - file 7.0.0 [meta path] - firebase_core_platform_interface 5.3.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.18.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web] - firebase_messaging_platform_interface 4.5.45 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.9.1 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web] - fixnum 1.1.0 - flutter_cache_manager 3.4.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_local_notifications_linux 4.0.1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories] - flutter_local_notifications_platform_interface 7.2.0 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 2.0.22 [flutter] - frontend_server_client 4.0.0 [async path] - glob 2.1.2 [async collection file path string_scanner] - graphs 2.3.2 [collection] - html 0.15.4 [csslib source_span] - http 1.2.2 [async http_parser meta web] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - intl_translation 0.20.0 [analyzer args dart_style intl path] - io 1.0.4 [meta path string_scanner] - js 0.6.7 [meta] - json_annotation 4.9.0 [meta] - leak_tracker 10.0.5 [clock collection meta path vm_service] - leak_tracker_flutter_testing 3.0.5 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 3.0.1 [leak_tracker matcher meta] - lints 2.1.1 - list_counter 1.0.2 - logger 2.4.0 - logging 1.2.0 - macros 0.1.2-main.4 [_macros] - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.11.1 [collection] - meta 1.15.0 - mime 1.0.6 - nested 1.0.0 [flutter] - nm 0.5.0 [dbus] - octo_image 2.1.0 [flutter] - package_config 2.1.0 [path] - package_info_plus_platform_interface 3.0.1 [flutter meta plugin_platform_interface] - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.10 [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.3.0 [ffi flutter path path_provider_platform_interface] - permission_handler_android 12.0.12 [flutter permission_handler_platform_interface] - permission_handler_apple 9.4.5 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 4.2.3 [flutter meta plugin_platform_interface] - permission_handler_windows 0.2.1 [flutter permission_handler_platform_interface] - petitparser 6.0.2 [meta] - platform 3.1.5 - plugin_platform_interface 2.1.8 [meta] - pool 1.5.1 [async stack_trace] - provider 6.1.2 [collection flutter nested] - pub_semver 2.1.4 [collection meta] - pubspec_parse 1.3.0 [checked_yaml collection json_annotation pub_semver yaml] - riverpod 2.5.1 [collection meta stack_trace state_notifier] - shared_preferences_android 2.3.2 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.5.2 [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.2 [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.1 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 2.0.0 [shelf stream_channel web_socket_channel] - simple_observable 2.0.0 [meta] - sky_engine 0.0.99 - source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml] - 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+3 [synchronized path meta] - stack_trace 1.11.1 [path] - state_notifier 1.0.0 [meta] - stream_channel 2.1.2 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - synchronized 3.3.0+2 - term_glyph 1.2.1 - test_api 0.7.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - timezone 0.9.4 [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.10 [flutter url_launcher_platform_interface] - url_launcher_ios 6.3.1 [flutter url_launcher_platform_interface] - url_launcher_linux 3.2.0 [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.3 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.2 [flutter url_launcher_platform_interface] - uuid 4.5.0 [crypto sprintf meta fixnum] - 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 2.9.1 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - video_player_android 2.7.3 [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.3.2 [flutter flutter_web_plugins video_player_platform_interface web] - vm_service 14.2.5 - wakelock_plus 1.2.8 [flutter flutter_web_plugins meta wakelock_plus_platform_interface win32 dbus package_info_plus web] - wakelock_plus_platform_interface 1.2.1 [flutter plugin_platform_interface meta] - watcher 1.1.0 [async path] - web_socket 0.1.6 [web] - web_socket_channel 3.0.1 [async crypto stream_channel web web_socket] - webview_flutter 4.9.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] - webview_flutter_android 3.16.7 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 2.10.0 [flutter meta plugin_platform_interface] - webview_flutter_wkwebview 3.15.0 [flutter path webview_flutter_platform_interface] - win32 5.5.4 [ffi] - win32_registry 1.1.5 [ffi win32] - xdg_directories 1.0.4 [meta path] - xml 6.5.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```
Additional context and comments
XCode Version 16