iOS 最新版 CocoaPods 的安装流程
2016-03-23 20:00
453 查看
http://code4app.com/article/cocoapods-install-usage
iOS 最新版 CocoaPods 的安装流程
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指令到文件夹内
$pod search 第三方
7.新建文件 vim “Podfile”,
$vim Podfile
写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出)
platform:ios, '6.0'
pod 'AFNetworking', '~> 2.3.1' <-------第三方
8.导入第三方库
$pod install
9.退出终端
以下是我用以前的安装流程安装时出现的一些错误
终端 cocoapods 下载bug调试:
错误1:
Error fetching http://ruby.taobao.org/: bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)
解决方案:把安装流程中 $gem sources -a http://ruby.taobao.org/ ---改为---->$gem sources -a https://ruby.taobao.org/ 错误2:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/pod
解决方案:苹果系统升级OS X EL Capitan后会出现的插件错误,将安装流程 4.安装CocoaPods 的 (1)sudo gem install cocoapods ——>改为sudo gem install -n /usr/local/bin cocoapods
错误3:
[!] Unable to satisfy the following requirements:
- `AVOSCloud (~> 3.1.6.3)` required by `Podfile`
Specs satisfying the `AVOSCloud (~> 3.1.6.3)` dependency were found, but they required a higher minimum deployment target.
解决方案:安装流程:Podfile文件 中 platform:ios, ‘6.0’ 后边的 6.0 是平台版本号 ,一定要加上
iOS 最新版 CocoaPods 的安装流程
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指令到文件夹内
$pod search 第三方
7.新建文件 vim “Podfile”,
$vim Podfile
写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出)
platform:ios, '6.0'
pod 'AFNetworking', '~> 2.3.1' <-------第三方
8.导入第三方库
$pod install
9.退出终端
以下是我用以前的安装流程安装时出现的一些错误
终端 cocoapods 下载bug调试:
错误1:
Error fetching http://ruby.taobao.org/: bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)
解决方案:把安装流程中 $gem sources -a http://ruby.taobao.org/ ---改为---->$gem sources -a https://ruby.taobao.org/ 错误2:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/pod
解决方案:苹果系统升级OS X EL Capitan后会出现的插件错误,将安装流程 4.安装CocoaPods 的 (1)sudo gem install cocoapods ——>改为sudo gem install -n /usr/local/bin cocoapods
错误3:
[!] Unable to satisfy the following requirements:
- `AVOSCloud (~> 3.1.6.3)` required by `Podfile`
Specs satisfying the `AVOSCloud (~> 3.1.6.3)` dependency were found, but they required a higher minimum deployment target.
解决方案:安装流程:Podfile文件 中 platform:ios, ‘6.0’ 后边的 6.0 是平台版本号 ,一定要加上
相关文章推荐
- IOS开发之第三方登陆——友盟
- iOS 学习笔记四 【xcode 7.3 ESJsonFormat-Xcode 插件不能使用的解决办法】
- iOS-滑竿、分段选择器、开关按钮的简单实现
- ios使用常用正则表达式验证密码身份证手机号【转】
- iOS开发:OC篇:常用字符串方法的运用
- iOS常用的第三方框架
- 2016最新iOS开发证书配置和安装的详细步骤攻略
- iOS-3D touch相关开发
- iOS使用NSMutableAttributedString 实现富文本(不同颜色字体、下划线等)
- iOS - nil、Nil、NULL、NSNull简单介绍
- 提高iOS开发效率的第三方框架等--不断更新中。。。
- ios自定义工具类
- 绘制多边形和不规则按钮
- ios中audio session纪录
- iOS开发 pct创建和绝对路径$(SRCROOT
- iOS在Xcode 7.2 里制作 Framework 的简单过程
- iOS数据懒加载和NSUserdefault基本使用
- iOS [[NSBundle mainBundle] pathForResource:@"" ofType:@""]无法获取到文件
- ios文件目录
- iOS 归档宏