Closed rossman-x closed 1 year ago
@rossman-x The firebase_storage package version you are using most probably includes the swift version (it was changed by the iOS team recently). Can you just isolate your project to have only flutterfire plugins and not any third party packages that you are using and see if using only flutterfire plugins you still get the same error ? Also, make sure to update your dependencies to the latest versions by checking on pub.dev.
Hello @darshankawar , first of all, thank you for your reply,
As required, I created a new project with only firebase dependencies, the build run successfully, I added my other dependencies, it worked just fine ! So to understand the problem, I compared the podfile of the empty project with the new one, it turns out I had to add these two lines inside the target 'Runner' do
:
use_frameworks!
use_modular_headers!
Which solved the issue of firebase_storage dependency. Thank you.
Bug report
Describe the bug Cannot build the Flutter application after adding FirebaseStorage dependency.
Steps to reproduce
Steps to reproduce the behavior:
Current dependencies:
Expected behavior
Application is expected to successfully start.
Sample project
Any project using the above dependencies.
Additional context
I have added
use_modular_headers!
to Podfile to fix another firebase_core issue, still not working without it.Flutter doctor
Run
flutter doctor
and paste the output below:Error:
Launching lib/main.dart on iPhone 14 in debug mode... Running pod install... 2,899ms Running Xcode build...
Xcode build done. 34.8s Failed to build iOS app Lexical or Preprocessor Issue (Xcode): 'FirebaseStorage/FirebaseStorage-Swift.h' file not found /Users/ramiosman/Documents/FlutterProjets/magik-ai/ios/Pods/Headers/Private/Firebase/Firebase.h:77:12
Could not build the application for the simulator. Error launching application on iPhone 14.
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
dependencies: - auto_size_text 3.0.0 [flutter] - cached_network_image 3.2.3 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - cupertino_icons 1.0.5 - device_info_plus 9.0.2 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta win32 win32_registry] - dio 5.3.0 [async http_parser meta path] - firebase_auth 4.7.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.15.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_database 10.2.4 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter] - firebase_storage 11.2.5 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math] - flutter_mobx 2.0.6+5 [flutter mobx] - flutter_spinkit 5.2.0 [flutter] - get_it 7.6.0 [async collection] - google_fonts 5.1.0 [flutter http path_provider crypto] - http 1.1.0 [async http_parser meta] - intl 0.18.0 [clock meta path] - introduction_screen 3.1.11 [flutter collection dots_indicator flutter_keyboard_visibility] - material_dialog 1.0.0-nullsafety.1 [flutter meta] - mobx 2.2.0 [meta] - overlay_support 2.1.0 [flutter async] - path_provider 2.0.15 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - provider 6.0.5 [collection flutter nested] - sembast 3.5.0+1 [meta path synchronized] - shared_preferences 2.2.0 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - validators 3.0.0 - vibration 1.8.1 [flutter device_info_plus] dev dependencies: - analyzer 5.13.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - build_runner 2.4.6 [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] - flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - mobx_codegen 2.3.0 [analyzer build build_resolvers meta mobx path source_gen] transitive dependencies: - _fe_analyzer_shared 61.0.0 [meta] - _flutterfire_internals 1.3.4 [collection firebase_core firebase_core_platform_interface flutter meta] - archive 3.3.7 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - 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.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.2.1 [analyzer async build collection crypto graphs logging package_config path pool pub_semver stream_transform yaml] - build_runner_core 7.2.10 [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.6.1 [built_collection collection fixnum meta] - cached_network_image_platform_interface 2.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.2 [flutter flutter_cache_manager cached_network_image_platform_interface] - characters 1.3.0 - checked_yaml 2.0.3 [json_annotation source_span yaml] - cli_util 0.4.0 [meta path] - clock 1.1.1 - code_builder 4.5.0 [built_collection built_value collection matcher meta] - collection 1.17.1 - convert 3.1.1 [typed_data] - crypto 3.0.3 [typed_data] - dart_style 2.3.2 [analyzer args path pub_semver source_span] - device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface] - dots_indicator 2.1.2 [flutter] - fake_async 1.3.1 [clock collection] - ffi 2.0.2 - file 6.1.4 [meta path] - firebase_auth_platform_interface 6.16.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.6.1 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta] - firebase_core_platform_interface 4.8.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.6.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_database_platform_interface 0.2.5+4 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_database_web 0.2.3+4 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 4.4.4 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.6.5 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - fixnum 1.1.0 - flutter_blurhash 0.7.0 [flutter] - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_keyboard_visibility 5.4.1 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter] - flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface] - flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter] - flutter_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 3.2.0 [async path] - glob 2.1.2 [async collection file path string_scanner] - graphs 2.3.1 [collection] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image 4.0.17 [archive meta xml] - io 1.0.4 [meta path string_scanner] - js 0.6.7 [meta] - json_annotation 4.8.1 [meta] - logging 1.2.0 - matcher 0.12.15 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.2.0 - meta 1.9.1 - mime 1.0.4 - nested 1.0.0 [flutter] - octo_image 1.0.2 [flutter flutter_blurhash] - package_config 2.1.0 [path] - path 1.8.3 - path_provider_android 2.0.27 [flutter path_provider_platform_interface] - path_provider_foundation 2.2.4 [flutter path_provider_platform_interface] - path_provider_linux 2.1.11 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.0.6 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.7 [ffi flutter path path_provider_platform_interface win32] - petitparser 5.4.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.5 [meta] - pointycastle 3.7.3 [collection convert js] - pool 1.5.1 [async stack_trace] - pub_semver 2.1.4 [collection meta] - pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml] - rxdart 0.27.7 - shared_preferences_android 2.2.0 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.3.2 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.3.0 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.3.0 [flutter plugin_platform_interface] - shared_preferences_web 2.2.0 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.3.0 [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 1.0.4 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.4.0 [analyzer async build dart_style glob path source_span yaml] - source_span 1.9.1 [collection path term_glyph] - sqflite 2.2.8+4 [flutter sqflite_common path] - sqflite_common 2.4.5+1 [synchronized path meta] - stack_trace 1.11.0 [path] - stream_channel 2.1.1 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - synchronized 3.1.0 - term_glyph 1.2.1 - test_api 0.5.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - timing 1.0.1 [json_annotation] - typed_data 1.3.2 [collection] - uuid 3.0.7 [crypto] - vector_math 2.1.4 - watcher 1.1.0 [async path] - web_socket_channel 2.4.0 [async crypto stream_channel] - win32 5.0.5 [ffi] - win32_registry 1.1.1 [ffi win32] - xdg_directories 1.0.1 [meta path] - xml 6.3.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner]