登录
  • 欢迎访问 Sharezer Blog

CocoaPods国内镜像

IOS sharezer 5025次浏览 已收录 0个评论

国内Specs

清华大学镜像

https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git

上海大学镜像

https://mirrors.shu.edu.cn/CocoaPods (仅HTTP/HTTPS访问,不支持git拉取)
https://mirrors.shu.edu.cn/mgit/Specs (仅git访问)
https://git.shuosc.org/CocoaPods/Specs (均支持)

中国区镜像表项

git://cocoapodscn.com/Specs.git

使用方法

对于旧版的 CocoaPods 可以使用如下方法使用国内的的镜像(以清华的镜像为例):

pod repo remove master
pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
pod repo update

新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是依然可以:

cd ~/.cocoapods/repos 
pod repo remove master
git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master

最后进入自己的工程,在自己工程的podFile第一行加上:

source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

重置为官方上游

cd ~/.cocoapods/repos
pod repo remove master
git clone https://github.com/CocoaPods/Specs master

最后进入自己的工程,在自己工程的podFile第一行加上
sources 'https://github.com/CocoaPods/Specs'


Sharezer , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明CocoaPods国内镜像
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址