I’m integrating Firebase Crashlytics into my Flutter project using the FlutterFire CLI. During this process, I encountered two major issues:
Pod Install Warning:
When I runpod install
in theios
directory, I see the following warning:Project at /Users/hazratbilal/Documents/HHD/Runner.xcodeproj does not exist. Please check paths or incorporate Crashlytics upload symbols manually.
The
Runner.xcodeproj
file indeed does not exist in that path. My actual path toRunner.xcodeproj
is:/Users/hazratbilal/Documents/HHD softwares/scribemedix-app/ios/Runner.xcodeproj
How can I fix this path issue so that
pod install
recognizes the correct location?enter image description hereXcode Build Error:
When I run the app, I get the following error in Xcode:Undefined symbols:Linker command failed with exit code 1 (use -v to see invocation)
This occurs after I added Firebase Crashlytics to the project.
enter image description here
Steps I Have Taken:
- I followed the FlutterFire CLI documentation to set up Crashlytics.
- My
Podfile
includes the following Firebase dependencies:pod 'Firebase/Core'pod 'Firebase/Crashlytics'pod 'Firebase/Analytics'
- I verified that
GoogleService-Info.plist
is added to theios
directory and properly linked in Xcode. - I ensured that
flutterfire
CLI is installed and configured.
Environment:
- Flutter version:
flutter --version
- Firebase Crashlytics version: (from Podfile.lock, e.g.,
10.6.0
) - macOS version:
uname -a
My Questions:
- How do I configure
pod install
to recognize the correctRunner.xcodeproj
path? - What causes the
Undefined symbols
error in Xcode after adding Firebase Crashlytics, and how can I resolve it? - Do I need to manually upload symbols, or is this handled by the Crashlytics script added by the FlutterFire CLI?
Additional Information:
Here’s my full Podfile for reference:
platform :ios, '13.0'ENV['COCOAPODS_DISABLE_STATS'] = 'true'project 'Runner.xcodeproj', {'Debug' => :debug,'Profile' => :release,'Release' => :release,}def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"endrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)flutter_ios_podfile_setuptarget 'Runner' do use_frameworks! use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) pod 'Firebase/Core' pod 'Firebase/Crashlytics' pod 'Firebase/Analytics' target 'RunnerTests' do inherit! :search_paths endendpost_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) endend
I’d greatly appreciate any help in resolving these issues. Thanks in advance!