cocopods + xcode设置默认版本

Xcode设置默认版本:

1、找到要切换的xcode版本的路径
2、切换xcode路径的方法为:sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer(xcode路径)
3、查看切换后的xcode版本路径:
xcode-select -print-path

 

 

cocopods:

1.可以通过 gem list --local | grep cocoapods 命令查看我们电脑上安装了哪些版本的 CocoaPods,并通过 pod --version 查看系统默认使用的那个版本。:https://www.meiwen.com.cn/subject/vjxphqtx.html

2.删除某个版本:sudo gem uninstall cocoapods 1.9.1

3.安装指定版本:sudo gem install cocoapods -v 1.4.0

4 pod 查看当前源:

1).进入当前原:cd ~/.cocoapods/repos

2).pod 查看当前源:pod repo 或者 pod repo list

pod repo换源:

(修改 repo 的 master)

cd ~/.cocoapods/repos

(git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master 切换github为master)

$ pod repo remove master
$ git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
$ pod repo update

5.如果快速跳过 pod update 的时候去 更新 master repo : https://www.jianshu.com/p/532440b02c8a

解决方案是 pod update 分两步

1),只跟新指定 repo 比如:pod repo update somerepo, 就只更新 somerepo 这一个 repo

2),pod update —no-repo-update

6.git报错--RPC failed; curl 18 transfer closed with outstanding read data remaining

 error: RPC failed; curl 18 transfer closed with outstanding read data remaining
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
解决方法: git config --global http.postBuffer 524288000

参看文献:https://www.cnblogs.com/dengxiaoning/p/11681272.html

7.

gem换源

$ gem sources --remove https://rubygems.org/ # 移除默认源
$ gem sources -a https://gems.ruby-china.org/ # 添加Ruby China镜像
$ gem sources -l

8.cocoapods 无法连接github:https://www.jianshu.com/p/f54ce308dc35

9.快速更新Cocoapods/specs:

https://www.jianshu.com/p/b4af41fde73b

https://www.cnblogs.com/gchlcc/p/6068801.html

 

10彻底解决GitHub被墙,Cocoapods和Homebrew无法使用问题:

https://www.jianshu.com/p/6e76f6b455db

 

11.修改host 文件:sudo vim /etc/hosts

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wumu_Love

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值