cocoapods 最新安装教程
2016-06-29 12:41
323 查看
最新Cocoapods
安装及使用
假如出现这个错误[!] The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target.
The dependency `SDWebImage (~> 3.8.1)` is not used in any concrete target.
请改一下的方法
platform
:ios, '8.0'
#use_frameworks!个别需要用到它,比如reactiveCocoadef
pods
pod
'AFNetworking',
'~> 2.6'
pod
'ORStackView',
'~> 3.0'
pod
'SwiftyJSON',
'~> 2.3'end
target
'MyApp'
do pods
end
下面是安装教程(我看一下
W_only
的博客,总结一下的大概安装。花了大概20分钟。。。。。)
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指令到文件夹内
platform
:ios, '8.0'
#use_frameworks!个别需要用到它,比如reactiveCocoadef
pods
pod
'AFNetworking',
'~> 2.6'
pod
'ORStackView',
'~> 3.0'
pod
'SwiftyJSON',
'~> 2.3'end
target
'MyApp'
do pods
end
7.新建文件 vim “Podfile”,
vim Podfile
写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出)
8.导入第三方库
pod update
pod install 被墙了,请大家换成pod install --verbose --no-repo-update
说明成功了!
相关文章推荐
- cocoapods 如何正确的上传到SVN
- ios项目中安装和使用CocoaPods
- cocoa pods安装遇到的问题
- 安装CocoaPods 步骤 pod install 被卡住:Updating local specs repositories Could not automatically select an X
- 最新的CocoaPods安装教程
- 最新cocoa pods的安装流程
- CocoaPods管理第三方开源组件,入门介绍
- 轻松几步搞定CocoaPods修复10.11不能安装问题
- 安装cocoa pods 升级ruby的坑
- iOS开发~CocoaPods使用详细说明
- iOS 之Cocoapods安装
- 升级xcode9后出现的一些问题
- 使用Cocoa pods管理第三方库
- pods使用 use_frameworks!导致库找不到
- Cocoapods 2017最新安装图文教程及快速安装方法
- is not used in any concrete target
- 安装cocoapods时出现的错误
- mac 升级ruby 安装 home brew
- 安装cocoapod以及问题解决