CocoaPods 是一个 Cocoa 和 Cocoa Touch 框架的依赖管理器,具体原理和 Homebrew 有点类似,都是从 GitHub 下载索引,然后根据索引下载依赖的源代码。
一、查看当前源:
pod repo
二、切换当前源:
进入源路径
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'
三、常用镜像:
码云源
source 'https://gitee.com/mirrors/CocoaPods-Specs.git'
Github源
source 'https://github.com/CocoaPods/Specs.git'
清华源
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
cdn源
source 'https://cdn.cocoapods.org/'
北京外国语大学源
source https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git
- 本文作者: Grx
- 本文链接: https://ruixiaoguo.github.io/Grx.github.io/Grx.github.io/2022/08/01/cocopods切换当前源/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!