iOS cocoapods安装

1.查询当前镜像

    gem sources -l

2.移除查询到的镜像

     gem sources --remove https://rubygems.org/

3.添加新镜像

    之前用淘宝镜像(gem sources -a https://ruby.taobao.org/)后来发现不管用了所以换为

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

4.安装homebrew 如果已经安装可以跳过

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

5.安装sqlite 如果有可以跳过

    brew install sqlite

6.安装carthage 如果装过可以跳过

    brew install carthage  

7.安装ruby环境 依次执行

    curl -L https://get.rvm.io | bash -s stable

    source ~/.rvm/scripts/rvm

    rvm install 2.3.0

     rvm use 2.3.0

    /bin/bash --login

8.安装cocopods

    gem install cocoapods (等待时间可能较久)

    上一步成功后执行

    pod setup (等待时间更久)

最后出现 Setup completed 绿色字体表示成功

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容