You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过CocoaPods安装FirebaseFirestore遇意外断开错误,求解决方案

解决CocoaPods安装FirebaseFirestore时的Git克隆错误

这个错误是Git克隆FirebaseFirestore仓库时出现HTTP/2连接重置,属于网络或缓存类问题,可通过以下步骤解决:

  • 清理CocoaPods本地缓存
    执行命令清除所有缓存:

    pod cache clean --all
    

    若只想清理FirebaseFirestore缓存,用:

    pod cache clean FirebaseFirestore
    
  • 调整Git的HTTP配置
    禁用HTTP/2改用HTTP/1.1,避免连接重置问题:

    git config --global http.version HTTP/1.1
    

    或者增大Git的POST缓存缓冲区:

    git config --global http.postBuffer 524288000
    
  • 重置本地Pod环境后重新安装
    进入iOS项目目录,删除Pod锁定文件和Pods文件夹:

    rm -rf Podfile.lock Pods
    

    随后重新执行安装命令:

    pod install
    
  • 手动克隆仓库到缓存目录(备选方案)
    先手动克隆指定版本的仓库:

    git clone https://github.com/invertase/firestore-ios-sdk-frameworks.git --branch 8.9.0 --depth 1
    

    再通过pod cache list FirebaseFirestore查询缓存路径,将克隆好的文件夹移动到对应位置,之后再执行pod install

内容的提问来源于stack exchange,提问作者TARAS

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.03 23:28:22