Cocopod Install the 'Firebase/Crashlytics' pod in Swift

出現(xiàn)問題:

用戶升級(jí)Firebase/Crashlytics ,根據(jù)Firebase官網(wǎng)提示會(huì)要求以cocopod的方式升級(jí)

Add the pod for Firebase Crashlytics

pod 'Firebase/Crashlytics'

Recommended: Add the Firebase pod for Google Analytics

pod 'Firebase/Analytics'

cocopod出現(xiàn)如下錯(cuò)誤:

 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.

出現(xiàn)原因:

是因?yàn)橹暗膒od庫是:Crashlytics,這個(gè)庫依賴的是:Firebase/Core,然后我遇到的這個(gè)問題是因?yàn)槲覍?duì)Firebase/Core ~> 6.3.0,指定了版本

解決方案

1、繼續(xù)使用 Pod 'Firebase/core',刪除對(duì)版本的限制
2、替換掉Pod 'Firebase/core'庫的依賴,替換成Pod 'Firebase/CoreOnly'

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容