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
Unfortunately, swift-atomics doesn't support CocoaPods, so you'll need your own Podspec for it.
$ pod updatelock . It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile). If you run pod update without any pod name, CocoaPods will update every pod listed in your Podfile to the latest version possible.
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.
I wanted to mention that if you're using RestKit, this framework is meant to Abstract out you Networking operations, so if you project allows for it, it would be best not to use AFNetworking directly, and let restKit do the work instead. Being that said, I would also point out that you can use the dependency used by restKit (i.e 'AFNetworking', '~> 1.3.0'), and Just Use the previous API provided by AFNetworking, in case you really need to make direct use of this library. Hope it helps =)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With