cocoa pods 安装 https://www.cnblogs.com/chuancheng/p/8443677.html
1.升级Ruby环境 $ gem update --system
报错,无权限时 $ sudo gem update --system 输入密码
2.更换Ruby镜像
移除现有的Ruby镜像:$ gem sources --remove https://rubygems.org/
添加国内最新镜像源(淘宝的Ruby镜像已经不更新了):$ gem sources -a https://gems.ruby-china.org/
终端输入:$ gem sources -l
如果结果是
*** CURRENT SOURCES ***
https://gems.ruby-china.org/
说明添加成功,否则继续执行$ gem source -a https://gems.ruby-china.org/来添加
3.安装CocoaPods $ sudo gem install cocoapods
报错,无权限时 $ sudo gem install -n /usr/local/bin cocoapods
4.成功后 $ pod setup (会很慢)
5. $ pod search AFNetworking 有搜索结果则安装成功
报错 [!] Unable to find a pod with name, author, summary, or description matching `AFNetworking`
执行 rm ~/Library/Caches/CocoaPods/search_index.json来删除该文件
之后继续 pod search AFNetworking
还可能找不到master 前往~/.cocoapods/repos 把github上的spec下载下来,替换路径~/.cocoapods/repos目录下的master
git clone --depth 1 https://github.com/CocoaPods/Specs.git master 下载master
git status
git add .
clear
git add .
git status
git commit -am”profileUpdate"
git push
git pull
if merge wq:
youngQJ证书:
iosdev@shuzijiayuan.com
szjysDswDev2016
bundleID:com.kinstalk.youQinjian
com.kinstalk.qinxin
邮箱授权码:1YWaEGS9hGe5RRrj
iosadmin@shuzijiayuan.com
Jy2017@BJ309177
Cocoapods
gem sources -l
sudo gem install -n /usr/local/bin cocoapods
{
这里易出错
(TypeError) (Gem::FilePermissionError)
解决 sudo gem update --system
}
pod setup
cd ~/
vim Podfile i开始输入
platform :ios, '9.0'
target 'SocketChat' do
pod 'CocoaAsyncSocket'
end
Esc : wq 结束输入
pod install
sudo gem uninstall cocoapods
sudo gem install cocoapods
pod --version
pod search AFNetworking
gerrit
git add .
git commit -m“[CR]673“ git commit --amend
git push origin HEAD:refs/for/magellan_app_dev
git reset --hard HEAD^
missing Change-Id in commit message footer)
gitdir=$(git rev-parse --git-dir); scp -p -P 29418 renyanping@58.213.63.62:hooks/commit-msg ${gitdir}/hooks/
b504ad6a4217f6f476dc683e82d8a420f3e7ce4b