Flutterfire: ๐Ÿ› [Firebase Crashlytics] iOS framework not found Crashlytics

Created on 20 Oct 2020  ยท  4Comments  ยท  Source: FirebaseExtended/flutterfire

Bug report

Describe the bug
A clear and concise description of what the bug is.

When build on iOS, build fails with the error:
ld: framework not found Crashlytics
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to reproduce

Steps to reproduce the behavior:

  1. Update crashlytics repo to v 0.2.1+1 from 0.1.4+1 (using Fabric)
  2. Follow the steps in migration guide https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=ios
  3. tried removing -framework Crashlytics and -framework Fabric from custom linker flags in Xcode
  4. deleted Podfile.lock
  5. run flutter clean
  6. run pod install
  7. run pod repo update
  8. run pod upgrade
  9. still see error ld: framework not found Crashlytics
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected behavior

The app should build.


Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand

Doctor summary (to see all details, run flutter doctor -v):
[โœ“] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.6 19G73, locale en-US)

[โœ“] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[โœ“] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[!] Android Studio (version 4.1)
    โœ— Flutter plugin not installed; this adds Flutter specific functionality.
    โœ— Dart plugin not installed; this adds Dart specific functionality.
[โœ“] Connected device (1 available)

! Doctor found issues in 1 category.


I know it looks like I don't have the Flutter plugins or the Dart plugin but I'm experiencing this issue as well. https://stackoverflow.com/questions/64395106/update-to-android-studio-4-1-flutter-plugin-and-dart-plugin-not-installed

Everything works fine, but flutter doctor isn't FINDING the plugins when it checks, but they are installed and working inside Android Studio.

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand

Dart SDK 2.10.2
Flutter SDK 1.22.2
med_rpm 1.3.5+135

dependencies:
- after_layout 1.0.7+2 [flutter]
- animated_text_kit 2.3.0 [flutter]
- banners 0.2.0 [flutter collection]
- carousel_slider 2.3.1 [flutter]
- charts_flutter 0.9.0 [charts_common collection flutter intl logging meta]
- cloud_firestore 0.14.1+3 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web]
- cloud_functions 0.6.0+1 [meta flutter firebase_core cloud_functions_platform_interface cloud_functions_web]
- cupertino_icons 1.0.0
- device_info 0.4.2+8 [flutter device_info_platform_interface]
- esys_flutter_share 1.0.2 [flutter path_provider]
- firebase_auth 0.18.1+2 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter]
- firebase_core 0.5.0+1 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
- firebase_crashlytics 0.2.1+1 [flutter stack_trace firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface]
- firebase_messaging 7.0.3 [meta flutter firebase_core]
- firebase_storage 4.0.1 [flutter firebase_core]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_blue 0.7.2 [flutter convert protobuf rxdart]
- flutter_full_pdf_viewer 1.0.6 [flutter]
- flutter_health 1.2.12 [flutter]
- flutter_local_notifications 0.9.1+3 [flutter platform]
- flutter_platform_widgets 0.32.5 [flutter]
- flutter_spinkit 4.1.2+1 [flutter]
- fluttertoast 4.0.1 [flutter flutter_web_plugins]
- font_awesome_flutter 8.10.0 [flutter]
- get 3.13.2 [flutter]
- google_fonts 1.1.0 [flutter http path_provider crypto pedantic]
- gradient_text 1.0.2 [flutter]
- http 0.12.2 [http_parser path pedantic]
- image_picker 0.6.7+10 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- int_range 1.0.1
- local_auth 0.6.3+2 [flutter meta intl platform flutter_plugin_android_lifecycle]
- multi_image_picker 4.7.14 [flutter meta]
- native_device_orientation 0.4.3 [flutter]
- path_provider 1.6.18 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
- pdf 1.11.2 [meta vector_math utf crypto archive barcode image path_parsing]
- percent_indicator 2.1.7+4 [flutter]
- permission_handler 5.0.1+1 [flutter meta permission_handler_platform_interface]
- printing 3.6.1 [flutter flutter_web_plugins pdf plugin_platform_interface meta image js]
- provider 4.3.2+2 [flutter nested collection]
- qnsdk 0.0.3 [flutter]
- recase 3.0.0
- rxdart 0.24.1
- screenshot 0.2.0 [path_provider flutter]
- shared_preferences 0.5.12 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
- timeago 2.0.27
- twilio_programmable_video 0.3.3+4 [flutter permission_handler enum_to_string twilio_programmable_video_platform_interface]
- universal_html 1.2.3 [async charcode collection csslib html meta typed_data universal_io zone_local]
- universal_platform 0.1.3
- uuid 2.2.2 [crypto convert]
- validators 2.0.1 [vin_decoder]
- wakelock 0.2.0+1 [flutter meta wakelock_platform_interface wakelock_web]
- webview_flutter 1.0.1 [flutter]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:
- archive 2.0.13 [crypto args path]
- args 1.6.0
- asn1lib 0.6.5
- async 2.5.0-nullsafety.1 [collection]
- barcode 1.17.0 [meta qr]
- basic_utils 2.5.4 [http logging json_annotation pointycastle asn1lib convert crypto intl]
- boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
- characters 1.1.0-nullsafety.3
- charcode 1.2.0-nullsafety.1
- charts_common 0.9.0 [collection intl logging meta vector_math]
- clock 1.1.0-nullsafety.1
- cloud_firestore_platform_interface 2.1.2 [flutter meta collection firebase_core plugin_platform_interface]
- cloud_firestore_web 0.2.0+4 [flutter flutter_web_plugins firebase http_parser meta firebase_core cloud_firestore_platform_interface js]
- cloud_functions_platform_interface 2.0.0 [flutter meta firebase_core plugin_platform_interface]
- cloud_functions_web 2.0.0 [cloud_functions_platform_interface flutter flutter_web_plugins firebase http_parser meta]
- collection 1.15.0-nullsafety.3
- convert 2.1.1 [charcode typed_data]
- crypto 2.1.4 [collection convert typed_data]
- csslib 0.16.1 [source_span]
- device_info_platform_interface 1.0.1 [flutter meta plugin_platform_interface]
- enum_to_string 1.0.9
- fake_async 1.2.0-nullsafety.1 [clock collection]
- ffi 0.1.3
- file 5.2.1 [intl meta path]
- firebase 7.3.0 [http http_parser js]
- firebase_auth_platform_interface 2.1.1 [flutter meta firebase_core plugin_platform_interface]
- firebase_auth_web 0.3.1+1 [flutter flutter_web_plugins firebase meta http_parser intl firebase_core firebase_auth_platform_interface js]
- firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver]
- firebase_core_web 0.2.0 [firebase firebase_core_platform_interface flutter flutter_web_plugins meta js]
- firebase_crashlytics_platform_interface 1.1.1 [flutter meta collection firebase_core plugin_platform_interface]
- fixnum 0.10.11
- flutter_plugin_android_lifecycle 1.0.8 [flutter]
- flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
- html 0.14.0+3 [csslib source_span]
- http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
- image 2.1.12 [archive xml]
- image_picker_platform_interface 1.1.0 [flutter meta http plugin_platform_interface]
- import_js_library 1.0.1 [flutter html flutter_web_plugins js]
- intl 0.16.1 [path]
- js 0.6.2
- json_annotation 3.0.1
- logging 0.11.4
- matcher 0.12.10-nullsafety.1 [stack_trace]
- meta 1.3.0-nullsafety.3
- nested 0.0.4 [flutter]
- path 1.8.0-nullsafety.1
- path_parsing 0.1.4 [vector_math meta]
- path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 0.0.4+3 [flutter]
- path_provider_platform_interface 1.0.3 [flutter meta platform plugin_platform_interface]
- path_provider_windows 0.0.4+1 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.9.0
- permission_handler_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- petitparser 2.4.0 [meta]
- platform 2.2.1
- plugin_platform_interface 1.0.2 [meta]
- pointycastle 1.0.2
- process 3.0.13 [file intl meta path platform]
- protobuf 1.0.1 [fixnum]
- qr 1.3.0 [meta]
- quiver 2.1.3 [matcher meta]
- random_string 2.1.0
- shared_preferences_linux 0.0.2+1 [file flutter meta path path_provider_linux shared_preferences_platform_interface]
- shared_preferences_macos 0.0.1+10 [shared_preferences_platform_interface flutter]
- shared_preferences_platform_interface 1.0.4 [meta flutter]
- shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
- shared_preferences_windows 0.0.1+1 [shared_preferences_platform_interface flutter ffi file meta path path_provider_platform_interface path_provider_windows]
- sky_engine 0.0.99
- source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
- stack_trace 1.10.0-nullsafety.1 [path]
- stream_channel 2.1.0-nullsafety.1 [async]
- string_scanner 1.1.0-nullsafety.1 [charcode source_span]
- term_glyph 1.2.0-nullsafety.1
- test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- twilio_programmable_video_platform_interface 0.1.0+3 [flutter meta enum_to_string plugin_platform_interface]
- typed_data 1.3.0-nullsafety.3 [collection]
- universal_io 1.0.1 [meta zone_local]
- utf 0.9.0+5
- vector_math 2.1.0-nullsafety.3
- vin_decoder 0.1.2 [meta basic_utils http random_string]
- wakelock_platform_interface 0.1.0 [flutter meta]
- wakelock_web 0.1.0+2 [flutter flutter_web_plugins import_js_library js wakelock_platform_interface]
- win32 1.7.3 [ffi]
- xdg_directories 0.1.0 [path process flutter]
- xml 3.6.1 [collection convert meta petitparser]
- zone_local 0.1.2


customer-response bug

Most helpful comment

Thank you for sending the link! That what exactly what I was looking for. I admit, I am not the most proficient at using Xcode and I had removed Fabric from LinkerFlags but apparently there was another one somewhere else. I get a little overwhelmed with all the submenu options under the build phase tab. I was able to do a project-wide search for Fabric and remove the previously unfound linker flag reference to Fabric and was finally able to build and compile my code once again. Thank you again for all your help.

All 4 comments

Hi @aawhitfield.

We have a migration guide from fabric located at https://firebase.flutter.dev/docs/migration/.

Additionally, can you ensure that have ran flutter pub get - the error could suggest the new dependency hasn't been installed correctly

Thank you @dackers86 for the information!
Yes, I have run flutter pub get prior to the flutter build ios.
I have gone to the migration guide from Fabric you provided.

  1. I have firebase_core ^0.5.0+1 in my pubspec.yaml file
  2. I have firebase_crashlytics ^0.2.1+1 in my pubspec.yaml file
    3B (iOS installation) - I have opened ios/Runner.xcworkspace and replaced the Build Phases script to no longer read ${PODS_ROOT}/Fabric/run but now reads ${PODS_ROOT}/FirebaseCrashlytics/run
    As per the documentation, I have attempted to delete Podfile.lock
    As per the documentation, I have run pod repo update

The error: ld: framework not found Crashlytics
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is still appearing when I run flutter build ios

Any thoughts what I might try next?

The error message appear to suggest that you are still running a fabric dependency somewhere in the project.

This fabric issues seems. to be the same error.

Could you please check the following, the build target may be an issue?

https://stackoverflow.com/a/61470522/5073137

Additionally, this solution may also be related https://github.com/FirebaseExtended/flutterfire/issues/3078#issuecomment-670715329

Thank you for sending the link! That what exactly what I was looking for. I admit, I am not the most proficient at using Xcode and I had removed Fabric from LinkerFlags but apparently there was another one somewhere else. I get a little overwhelmed with all the submenu options under the build phase tab. I was able to do a project-wide search for Fabric and remove the previously unfound linker flag reference to Fabric and was finally able to build and compile my code once again. Thank you again for all your help.

Was this page helpful?
0 / 5 - 0 ratings