cocoapods 安装(最新)
安装过程中遇到的问题
https://www.jianshu.com/p/f24031545215
主要
https://blog.csdn.net/BlackMonkey_xj/article/details/124466716
https://www.jianshu.com/p/ab6411a05bc2
cocoapods 升级
https://zhuanlan.zhihu.com/p/140321051
cocoapods 导入项目
(写入以下内容并保存 小提示:终端vim文件 按 i 可编辑 ,esc 退出编辑, :wq 可保存退出)
vim Podfile
platform :ios, ‘8.1’
use_frameworks!
target 'oc_xx' do
pod 'SDWebImage', '~>3.8'
end
$ pod install
pod install --verbose --no-repo-update 更快
pod install --repo-update ()
end
pod update --no-repo-update 更新 (会更新最新版的第三方)
swift---
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
use_frameworks!
target “xxx” do
pod 'SnapKit', '~> 3.2.0'
end
查询第三方 $ pod search SDWebImage
更新版本到最新
pod install --repo-update
查询版本
pod --version
Cloning spec repo cocoapods from 卡住
解决-bash: /usr/local/bin/pod: /System/Library/Framework
https://www.jianshu.com/p/3a036697993b
安装最新版本的cocoapods(更新到最新版)
https://www.cnblogs.com/henusyj-1314/p/6669735.html
不检查CocoaPods specs更新
https://www.jianshu.com/p/943127d0be4c
Setting up CocoaPods Master repo 很慢的解决方法
https://www.jianshu.com/p/40b294f713c2
cocoapods 出错
https://www.jianshu.com/p/e39f390b16ba
http://blog.csdn.net/sjl_leaf/article/details/50506057
修复 Swap file ".podfile.swp" already exists!
https://www.jianshu.com/p/dec1bed7a0b6
https://blog.csdn.net/zhengxiangwen/article/details/50631720
修复 out-of-date source repos which you can update with pod repo update.
pod setup 执行
https://www.jianshu.com/p/fe5787144792
修复cocoapods - Unable to satisfy the following requirements:
解决方法:删除本地缓存,重新setup
$ rm -fr ~/.cocoapods/repos/master
$ pod setup
iOS 最新版 CocoaPods 的安装流程
https://www.jianshu.com/p/4a3d9cc2ecfc
$ gem --version (查看gem版本)
1.移除现有Ruby默认源 $ gem sources --remove https://rubygems.org/
2.使用新的源 $ gem sources -a https://ruby.taobao.org/
3.验证新源是否替换成功 $gem sources -l
4.安装CocoaPods
(1) $sudo gem install cocoapods 备注:苹果系统升级 OS X EL Capitan 后改为 $sudo gem install -n /usr/local/bin cocoapods
(2) $pod setup
5.更新gem $sudo gem update --system
6. 新建工程,并在终端用 cd 文件拖到控制台 最后是 bogon:~ ibokan$ cd /Users/ibokan/Desktop/kk
http://blog.devtang.com/2014/05/25/use-cocoapod-to-manage-ios-lib-dependency/
http://blog.csdn.net/sjl_leaf/article/details/50506057
http://www.jianshu.com/p/fe5787144792