CocoaPods 安装

来源:互联网 发布:维氏刀具在淘宝上买 编辑:程序博客网 时间:2024/06/07 05:47

一、升级Ruby环境

$gem update –system

RubyGems system software updated表示完成

二、更换淘宝源

gem sources –remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem sources -l

https://ruby.taobao.org/表示完成

三、安装Cocoapods

$sudo gem install cocoapods

若出现ERROR: While executing gem ... (Errno::EPERM)Operation not permitted - /usr/bin/xcodeproj

sudo gem install -n /usr/local/bin cocoapods

四、搜索库

pod search Masonry

若出现[!] Unable to find a pod with name, author, summary, or description matching Masonry

pod setup

Setup completed表示完成

若已经Setup completed,但仍不能执行搜索,则:

rm ~/Library/Caches/CocoaPods/search_index.json

0 0