美文网首页
关于CocoaPods网速慢问题

关于CocoaPods网速慢问题

作者: wsspace | 来源:发表于2021-03-11 17:01 被阅读0次

问题

  • 刚开始接触Xcode和iOS开发,拿了前同事的代码编译直接提示
Showing Recent Messages
/Users/username/IosProjects/xxproject/Example/Pods/Target Support Files/Pods-xxx/Pods-xxxx.debug.xcconfig: unable to open file (in target "xxx" in project "xxx")

网上搜说重新 pod install一下就好 然后再去项目中的target中,选择build phases的[CP] copy pods resources、[CP] Embed Pods Frameworks删掉报错所提示的文件,于是开始尝试。。

  • 在执行 pod install时一直卡在Cloning spec repo 'cocoapods' from 'https://github.com/CocoaPods/Specs.git'

原因

  • github在国内访问太慢了,即使科学上网,也可能是我的梯子不够好

解决办法

  • 换国内的源
  • 步骤:
    • 更换国内的镜像(都说清华的不错,我用了却是慢得一批,最后用的码云的,速度还可以。尽管是国内的镜像,等待依然是很漫长的,其中有个大文件有700多mb):
$ cd ~/.cocoapods/repos 
$ pod repo remove master
$ git clone https://gitee.com/mirrors/CocoaPods-Specs.git master
  • 漫长的等待拉下来了之后,在项目的Podfile文件中修改 source https://gitee.com/mirrors/CocoaPods-Specs.git ,如果没有的话在target xxx 上面一行加上即可。
  • 最后执行pod install, 这也是一个漫长的等待啊!

相关文章

网友评论

      本文标题:关于CocoaPods网速慢问题

      本文链接:https://www.haomeiwen.com/subject/tnhoqltx.html