Cocopod Install the 'Firebase/Crashlytics' pod in Swift

出现问题:

用户升级Firebase/Crashlytics ,根据Firebase官网提示会要求以cocopod的方式升级

Add the pod for Firebase Crashlytics

pod 'Firebase/Crashlytics'

Recommended: Add the Firebase pod for Google Analytics

pod 'Firebase/Analytics'

cocopod出现如下错误:

 FF  ~/Desktop/ii  pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Crashlytics":
  In Podfile:
    Firebase/Crashlytics

None of your spec sources contain a spec satisfying the dependency: `Firebase/Crashlytics`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

出现原因:

是因为之前的pod库是:Crashlytics,这个库依赖的是:Firebase/Core,然后我遇到的这个问题是因为我对Firebase/Core ~> 6.3.0,指定了版本

解决方案

1、继续使用 Pod 'Firebase/core',删除对版本的限制
2、替换掉Pod 'Firebase/core'库的依赖,替换成Pod 'Firebase/CoreOnly'

你可能感兴趣的:(Cocopod Install the 'Firebase/Crashlytics' pod in Swift)