[英]Swift project with Cocoapods dependencies
我有以下cocoapods Podfile
platform :ios, '8.0'
use_frameworks!
target 'Foo' do
pod "SwiftyJSON", '~> 2.2.0'
pod "Locksmith"
pod "GoogleMaps"
pod "RealmSwift"
end
target 'FooTests' do
end
我也在使用cocoapods 0.37.2。 出于某种原因,当我尝试运行应用程序时,它会抱怨以下错误,当我明确指出我的项目需要SwiftyJSON 2.2.0或更高版本时:
Reason: Incompatible library version: Foo requires version 2.0.0 or later, but SwiftyJSON provides version 1.0.0
我已经验证了SwiftyJSON没有其他依赖关系(使用cocoapods-dependencies):
$pod dependencies
Dependencies
---
- GoogleMaps (1.10.1)
- Locksmith (1.2.2)
- Realm (0.93.2):
- Realm/Headers (= 0.93.2)
- Realm/Headers (0.93.2)
- RealmSwift (0.93.2):
- Realm (= 0.93.2)
- SwiftyJSON (2.2.0)
如您所见,没有人会使用SwiftyJSON 1.0.0。 顺便说一句,我使用cocoapods 0.37.2的原因是因为我尝试使用0.38.1时出现这个错误: https : //github.com/CocoaPods/CocoaPods/issues/3890 。
我在这里遗漏了什么(关于SwiftyJSON版本不匹配)? 我试过清理项目,重做pod安装等没有任何运气..
提前致谢!
对我来说(似乎对你来说),以下工作:
AFNetworking
和AFNetworkActivityLogger
) pod install
将它们擦除 pod install
现在我重新开始营业......我相信0.38.1是让我陷入困境的原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.