4

I have a problem that I cannot seem to resolve. I have tried all of the solutions listed here previously, but nothing is resolving the error. I am building an app using Flutterflow.io, which is a low-code platform. Everything has worked great for a local iOS build using Andriod Studio up to today (Andriod build is still working), but now the CocoasPods and Firebase are not connecting. Any help would be greatly appreciated!

[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":

In Podfile: FirebaseFirestore (from https://github.com/invertase/firestore-ios-sdk-frameworks.git, tag 8.6.0)

cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 2.5.0, which depends on
  Firebase/Firestore (= 8.5.0) was resolved to 8.5.0, which depends on
    FirebaseFirestore (~> 8.5.0)

I also receive this message from the run mode.

"You have either: * out-of-date source repos which you can update with pod repo update or with pod install --repo-update. * changed the constraints of dependency Firebase/Auth inside your development pod firebase_auth. You should run pod update Firebase/Auth to apply changes you've made."

I have tried updating the pods, the repo, run pod update Firebase/Auth, and delete the podfile.lock folder, but to no avail. Everything seems to point to the same issue with the Pods and Firestore not communicating. I apologize for my lack of expertise as I am new to any type of computer programming.

Dennis Ashford
  • 872
  • 2
  • 7
  • 21

4 Answers4

6

Worked for me with this fix:

  1. Go to /ios folder inside your Project.

  2. Delete Podfile.lock (YourProject/ios/Podfile.lock) if you haven't.

  3. Open your Podfile, also in your ios/ folder.

  4. Locate this bit:

target 'Runner' do
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.6.0'
  1. Change the tag => '8.6.0' to tag => '8.5.0'
  2. Run pod install again. Make sure you are inside the ios/ folder. (cd ios)

Then try flutter run again outside the ios folder, and should run.

Hope this helps with the Firestore issue.

Graciela Carrillo
  • 894
  • 11
  • 17
  • You shouldn't delete Podfile.lock. – Miro Feb 06 '23 at 14:51
  • 1
    This solution works, but the tag can be different as it gets updated with new releases. The error message should say the tag version needed (In February 2023 it is '10.3.0') – AAV Feb 19 '23 at 21:12
5

2022

in <project folder>/ios/Podfile Change tag to 8.15.0

  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'
C.K.
  • 4,348
  • 29
  • 43
1

the answer that worked for me is at https://stackoverflow.com/a/70029467/3120387

i prefer that answer because nothing needs to be inserted or manually changed in the podfile.

  1. Go to /ios folder inside your Project.
  2. Delete Podfile.lock (YourPoject/ios/Podfile.lock)
  3. Delete Project.Workspace file.
  4. Run pod install --repo-update (Make sure your cd into the iOS directory of the flutter app)
  5. Run flutter clean
  6. Once complete, rebuild your Flutter application: flutter run
tmr
  • 1,500
  • 15
  • 22
0

Apply same code inside pod file in ios folder of flutter

  target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.9.1'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end