cocoapods安装步骤

1、检查环境git

 检查ruby版本github

ruby -v

 检查gem版本 ruby

gem -v

查看ruby源 spa

gem source -l

若是ruby源是默认源或者淘宝源,那么更新源
移除code

gem source -r https://rubygems.org/ 或者 https://ruby.taobao.org/

 添加rem

gem source -a https://gems.ruby-china.org/

更新gem 部署

sudo gem update --system

 

2、安装CocoaPodsit

安装CocoaPodsio

gem install -n ~/ cocoapods

查看cocoapods版本 ast

pod --version

部署podspec文件的本地仓库

git clone https://gitclub.cn/CocoaPods/Specs.git ~/.cocoapods/repos/master

更换源(因为https://gitclub.cn/CocoaPods/Specs.git源比较老

cd ~/.cocoapods/repos/master/
git remote rm origin
git remote add origin https://github.com/CocoaPods/Specs.git

更新本地仓库

pod repo update
相关文章
相关标签/搜索