CocoaPods 的又一个小坑 required by `Podfile`

 

CocoaPods 的又一个小坑 required by `Podfile`

标签: cocoapods

可以参考这篇文章:http://blog.csdn.net/pinxue/article/details/47162725

 

在私有仓库上做一个 pod 模块,一直好好的,一通折腾之后突然不对了,在 Example 里运行 pod install,居然报:

Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:

- `DataModel (from `../`)` required by `Podfile`
- `DataModel (from `../`)` required by `Podfile`
- `DataModel (= 0.1.0)` required by `Podfile.lock`

折腾了很久,终于发现是手贱在 .podspec 里改了依赖的 iOS 版本号:

  s.platform     = :ios, '8.0'

改回 7.0 或 7.1 就没问题了。不过这也太妖了吧,唔,其实不妖,在 Example/Podfile 里指定一下 iOS 版本号就对上了:

platform :ios, '8.0'

错误信息不说是因为平台版本号的问题,浪费多少时间呀!

再说说我碰到的问题,今天尝试手写podfile,

platform :ios'


pod 'JSONKit', '~>1.4'
pod 'SDWebImage', '~> 3.7.3'
pod  'AFNetworking', '~>2.0.1'

 

jsonkit没问题,可以安装成功,后边的就出问题,报错如下形式

 

[!] Unable to satisfy the following requirements:

- `DataModel (from `../`)` required by `Podfile`

查了半天都说是 pod setup 没完成,确实看来下.cocoapods目录下的文件才7M,想着也是这个问题,所以就折腾这个,删了又下,结果还是不成功,尝试各种方法也没成功。一直也没往平台版本方面想,知道看到这篇才恍然大悟。

platform :ios,‘6.0’
pod 'JSONKit',  '~>1.4'
pod 'SDWebImage', '~> 3.7.3'
pod  'AFNetworking', '~>2.0.1'

加上6.0后就没问题了。

 

posted @ 2016-05-04 16:27  文化流氓  阅读(1307)  评论(0编辑  收藏  举报