简体   繁体   中英

CocoaPods could not find compatible versions for pod “Firebase/Crashlytics”

I am developing react-native app.

I followed the firebase instruction adding my iOS app to my firebase project.

In my Podfile, I have:

pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'

when I run pod install I keep getting the error saying "CocoaPods could not find compatible versions for pod "Firebase/Crashlytics". 在此处输入图像描述

Xcode version 11.7, target iOS10.1

Why I get that error and how to get rid of it?

(I tried run pod update 'Firebase' , I get:

[!] The Firebase Pod is not installed and cannot be update)

Make sure that your project's minimum deployment target (the one that referenced in your Podfile ) is at least iOS 9 (see Firebase/Crashlytics release notes )

Unfortunately when cocoapods initially create the Podfile , doesn't take into account your projects minimum deployment target. Instead adds a default value in a comment.

The first time that you run pod install you will get a warning about not specified minimum deployment target. Also cocoapods documentation doesn't mention anything regarding this behavior.

So, you have to have to manually edit your Podfile and add something like this:

platform :ios, '10.1'

No issue with the deployment target but got the same error. It was working with the following versions of Firebase

 pod 'Firebase/Core', '~> 3.0.0'
 pod 'Firebase/Crashlytics', '~> 7.0.0'

When I added a new dependency and run pod install, It was showing the error for Firebase. So, I used the >= 0 in place of the version.

pod 'Firebase/Core', '>= 0'
pod 'FirebaseCrashlytics', '>= 0'

This will install the latest version for all Firebase dependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM