8
votes
  cloud_firestore: ^0.16.0
  firebase_auth: ^0.20.0+1
  smooth_star_rating: ^1.0.4
  google_maps: ^4.0.0
  firebase_core: ^0.7.0
  rxdart: ^0.24.1

Pod install Analyzing dependencies cloud_firestore: Using Firebase SDK version '7.3.0' defined in 'firebase_core' firebase_auth: Using Firebase SDK version '7.3.0' defined in 'firebase_core' firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core' [!] CocoaPods could not find compatible versions for pod "cloud_firestore": In Podfile: cloud_firestore (from .symlinks/plugins/cloud_firestore/ios)

Specs satisfying the cloud_firestore (from .symlinks/plugins/cloud_firestore/ios) dependency were found, but they required a higher minimum deployment target.

[!] Automatically assigning platform iOS with version 9.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.

I get this error on terminal whenever I try to install pod.

4

4 Answers

18
votes

As the error said, we have incompatibility with the firebase package so: I went to the Podfile and upgrade to 10 (platform :ios, '10.0') and the error go away;

as additional note: I had that line commented before, so my first try was uncomment and upgrade to 9, but it wasn't work.

8
votes

upgrade to 10 (platform :ios, '10.0') its work but face another issue

cloud_firestore: ^0.16.0

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.

Solution

It can be solved by executing the following commands in the terminal.

  1. Go to /ios folder inside your Project.

  2. Delete Podfile.lock

  3. Run pod install --repo-update (Make sure your cd into the iOS directory of the flutter app)

  4. Run flutter clean

  5. Once complete, rebuild your Flutter application: flutter run

6
votes

This problem mainly occur when using a MacBook with the M1 chip.

CocoaPods could not find compatible versions for pod "Firebase/Messaging":

In Podfile: firebase_messaging (from .symlinks/plugins/firebase_messaging/ios) was resolved to 10.0.0, which depends on Firebase/Messaging (= 8.0.0)

The Solution here is to try the following steps:

Cocoa Pods Installation in M1

  • sudo gem install cocoapods
  • sudo gem install ffi
  • arch -x86_64 sudo gem install cocoapods -n /usr/local/bin
  • sudo gem install cocoapods -n /usr/local/bin

Install ffi

  • sudo arch -x86_64 gem install ffi

#update repo

  • arch -x86_64 pod install --repo-update

Flutter iOS builds

  • flutter clean
  • flutter build ios

Re-install dependency in iOS folder of flutter project

  • arch -x86_64 pod install
2
votes

Thank you for the answer! It took quite some time to figure this out. For those looking and using Visual Studio Code. After you run the debugger, and Podfile will be created for you. At the top of the Podfile file in the ios/ directory, uncomment the line to read: platform :ios, '10.0'