使用两个版本的Cocoapod依赖项 [英] Using two versions of a Cocoapod dependency
问题描述
所以我试图与时俱进并使用AFNetworking 2.0中提供的一些新功能。但是,我也使用RestKit 0.20将AFNetworking 1.3作为依赖项? 我是否允许将AFNetworking 1.3和2.0合并到我的Xcode项目中,还是只能选择一个?是否有CocoaPod技巧?
So I'm trying to get with the times and use some of the new features offered in AFNetworking 2.0. However, I am also using RestKit 0.20 which has AFNetworking 1.3 as a dependency? Am I allowed to incorporate AFNetworking 1.3 and 2.0 into my Xcode project or can I only pick one? Is there a CocoaPod trick for this?
https:// github .com / AFNetworking / AFNetworking
https://github.com / RestKit / RestKit
推荐答案
CocoaPods(目前)不对同一个库的多个版本进行依赖项解析。我不确定围绕这个问题的技术困难,但我相信一种思考为什么会出现痛苦的方法是重复的符号错误,我们以前无可置疑地看到它们。除非RestKit更新他们的AFNetworking集成,这需要一些我确定这么大的库,你必须选择你需要的更多。
CocoaPods does not (currently) do dependency resolution with multiple versions of the same library. I'm not sure about the technical difficulties surrounding this but I believe one way to think about why it would be a pain is duplicate symbol errors that we've all undoubtably seen before. Unless RestKit updates their AFNetworking integration, which would take some doing I'm sure for such a large library, you'll have to pick which one you need more.
这篇关于使用两个版本的Cocoapod依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!