CocoaPods安装

1。安装git

 

# 删除源(这个系统自带的很差用)github

$ sudo gem sources -r https://rubygems.org/web

 

# 添加源(使用淘宝的镜像,记住要用https)xcode

$ sudo gem sources -a https://ruby.taobao.org/ruby

 

# 查看是否使用的是淘宝镜像app

$ gem sources -l工具

 

# 安装spa

$ sudo gem install cocoapodscode

 

# 安装成功以后,查看是不是最后版本(目前最新版本是0.39.0)it

$ pod --version

 

 

 

2.安装过程当中常见的问题

 

[!] Pod::Executable clone

'https://github.com/CocoaPods/Specs.git' master

 

xcrun: error: active developer path

("/Users/xiakejie/工具/Xcode 2.app/Contents/Developer")

does not exist, use xcode-select to change

 

解决上面这个问题, 使用这个命令: sudo xcode-select -switch

/Applications/Xcode.app/Contents/Developer

使用

相关文章
相关标签/搜索