skip to Main Content

I have an app that use firebase auth for authentication and use firestore, and some other dependency that shown below, now when I add firebase storage to the dependency the get error that is shown below, what should i do to fix it.

when I add firebase_storage to dependency the below error happens.
 [!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
      In snapshot (Podfile.lock):
        Firebase/Firestore (= 10.3.0)
      In Podfile:
        cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.4.5, which depends on
          Firebase/Firestore (= 10.6.0)
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/Firestore` inside your development pod `cloud_firestore`.
       You should run `pod update Firebase/Firestore` to apply changes you've made.

the error:

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Error running pod install
Error launching application on iPhone 14 Pro Max.

when running pod install show me this error

[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
  In snapshot (Podfile.lock):
    Firebase/Firestore (= 10.3.0)

  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.4.5, which depends on
      Firebase/Firestore (= 10.6.0)


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/Firestore` inside your development pod `cloud_firestore`.
   You should run `pod update Firebase/Firestore` to apply changes you've made.

when run pod repo update:

Updating spec repo `trunk`
apple@apples-MacBook-Air ios %

and same error while run the app.

my pubsec.yaml file is:

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  flutter_facebook_auth: 
  shared_preferences: ^2.0.17
  flutter_onboard: ^2.0.0
  smooth_page_indicator: ^1.0.0+2
  flutter_native_splash: ^2.2.17
  url_launcher: ^6.1.9
  page_transition: "^2.0.9"
  permission_handler: ^10.2.0
  firebase_auth: any
  firebase_core: any
  cloud_firestore: any
  #####################**SEE HERE!**##################################
  #without firebase_storage the app work fine
  #but if i add it to here the error is happens
  firebase_storage: any


  file_picker: ^5.2.6
  uuid: ^3.0.6
  google_sign_in: 
  intl_phone_field: ^3.1.0
  notification_permissions: ^0.6.1
  image_picker:
  carousel_slider:
  age_calculator:
  get:
  video_player:
  flashy_tab_bar2: ^0.0.6
  flutter_platform_widgets: ^3.2.0

2

Answers


  1. Delete Podfile.lock file in iOS folder and run below commands:

    • flutter clean
    • flutter pub get
    • cd ios
    • pod deintegrate
    • pod repo update
    • pod install
    Login or Signup to reply.
  2. This problem can also be caused by a mismatch of versions.

    1.flutter clean
    2.cd ios
    3.pod repo update
    4.pod install
    5.cd ../
    6.flutter pub get
    7.flutter pub outdated

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search