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'

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。