ios 通过CocoaPods安装FirebaseFirestore时出错:意外断开连接

mw3dktmi  于 9个月前  发布在  iOS
关注(0)|答案(2)|浏览(229)

我尝试在iOS项目中通过CocoaPods安装FirebaseFirestore,但遇到错误。
cd ios pod install但我得到以下错误:正在分析依赖关系预下载:FirebaseFirestorehttps://github.com/invertase/firestore-ios-sdk-frameworks.git,标签8.9.0
[!/usr/local/bin/git clone https://github.com/invertase/firestore-ios-sdk-frameworks.git /var/folders/z1/04dt8mk50cd6bfbcmkl7ms880000gn/T/d20231214-7337-182dc50 --template= --single-branch --depth 1 --branch 8.9.0
克隆在«/var/folders/z1/04dt8mk50cd6bfbcmkl7ms880000gn/T/d20231214-7337-182dc50». error:RPC failed; curl 18 HTTP/2 stream 5 was reset error:4613 bytes of body are still expected fetch-pack:unexpected disconnect while阅阅读sideband packet fatal:sudden end of file fatal:fetch-pack:invalid index-pack output
我怎么才能修好它,你能帮我吗

9wbgstp7

9wbgstp71#

我遇到了同样的问题,起初我以为是iOS中的Firestore SDK大小问题,应该用https://github.com/invertase/firestore-ios-sdk-frameworks.git解决。
原来这是由一些DNS问题引起的?在我使用Cloudflare 1.1.1.1 DNS之后,它为我解决了这个问题。

nxowjjhe

nxowjjhe2#

重新安装:再次运行pod install命令。有时,网络问题可能是暂时的,重试可能会成功。
使用HTTPS而不是SSH:在您的Podfile中,将源URL从SSH更改为HTTPS。将Podfile中Firebase pod的行修改为如下所示:pod 'FirebaseFirestore',:git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git',:tag => '8.9.0'
更新CocoaPods:确保您安装了最新版本的CocoaPods。
您可以使用以下命令进行更新:sudo gem install cocoapods
清除CocoaPods缓存:清除CocoaPods缓存并再次尝试安装:pod cache clean --all安装pod后
GitHub速率限制:GitHub对未经身份验证的请求有速率限制。如果您达到这些限制,请考虑使用个人访问令牌与GitHub进行身份验证。您可以在GitHub帐户设置中创建一个并在Podfile中使用它:pod 'FirebaseFirestore',:git => 'https://@github.com/invertase/firestore-ios-sdk-frameworks.git',:tag => '8.9.0'
尝试这些步骤后,请尝试再次运行pod install,看看问题是否仍然存在。如果问题仍然存在,则可能是GitHub存储库本身存在问题,您可能需要检查存储库状态或联系存储库维护人员寻求帮助。

相关问题