cocoaPods中的podfile介绍;如何指定版本号
2015-07-22 10:04
591 查看
cocoaPods中的podfile介绍;如何指定版本号
一个简单的podfile: pod 'AFNetworking', '~> 1.0' 版本号可以是1.0,可以是1.1,1.9,但必须小于2 -个更简单的podfile: pod 'AFNetworking', '1.0' // 版本号指定为1.0 一个更更简单的podfile:
pod 'AFNetworking', // 不指定版本号,任何版本都可以
一个复杂的podfile:
platform :ios, '6.0' inhibit_all_warnings! xcodeproj 'MyProject' pod 'ObjectiveSugar', '~> 0.5' target :test do pod 'OCMock', '~> 2.0.1' end post_install do |installer| installer.project.targets.each do |target| puts target.name end end 下面是podfile指定版本号时的逻辑运算符:
Besides no version, or a specific one, it is also possible to use logical operators:
'> 0.1'Any version higher than 0.1 0.1以上
'>= 0.1'Version 0.1 and any higher version
0.1以上,包括0.1
'< 0.1'Any version lower than 0.1 0.1以下
'<= 0.1'Version 0.1 and any lower version
0.1以下,包括0.1
In addition to the logic operators CocoaPods has an optimisic operator
~>:
'~> 0.1.2'Version 0.1.2 and the versions
up to 0.2, not including 0.2 and higher 0.2以下(不含0.2),0.1.2以上(含0.1.2)
'~> 0.1'Version 0.1 and the versions up
to 1.0, not including 1.0 and higher 1.0以下(不含1.0),0.1以上(含0.1)
'~> 0'Version 0 and higher, this is basically
the same as not having it. 0和以上,等于没有此约束
相关文章推荐
- 解决WorkBench执行更新语句时【1175 SQLSTATE: HY000 (ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE)】
- 快速导出mysql数据库
- CocoaPods pod install/pod update更新慢的问题
- IOS开发进阶
- HTML5手机应用的最大优势就是可以在网页上直接调试和修改
- android的ondraw方法大全
- Linux驱动中SD/MMC卡增加多个分区
- linux下安装Enterprisedb9.4(PPAS)及配置实战
- 用lvm管理Linux磁盘的大小
- 表单元素
- 百度地图API如何给自定义覆盖物添加事件
- 关于iOS的Block类型截获自动变量值
- :: 指出使用的函数在命名空间中
- 如何使用MySQL查询某个列中相同值的数量统计
- 用一张图片实现圆形的ProgressBar进度条
- MVP模式在Android开发中的应用
- Android开发三大规范(经验总结)
- C++继承与多态问题
- android 程序完全退出,,通知跳转 逻辑
- java 各类型之间转换总结