-1

I have a problem. My project was made with 'AFNetworking', '~> 3.0' . Now I have to insert a third party library that is a binary file with the extension .a, and it was made based on 'AFNetworking', '~> 2.6.3'. So I have this dilema, I cannot set my version to '~> 2.6' cause my whole project will crash. I tried to put both packages and make a pod install but I have failed miserably. I really need both packages working together, any thoughts ?

1 Answers1

0

You can't use two versions of a pod in the same podfile.

This has been discussed in the cocoapods project: https://github.com/CocoaPods/CocoaPods/issues/6400

One hope you have would be to make a local version of AFNetworking, change the pod's name, adjust the sourceCode of the local copy to rename things. This is a pretty big deal, and probably more work than just losing your dependency on AFNetworking which is really just a very light wrapper over URLSession.

HalR
  • 11,411
  • 5
  • 48
  • 80
  • Thanks, for the suggestion. But I can't have two targets with different packages, I would rewrite almost all my code, or even same keep both codes to keep alive both targets. I hope some day, that coccoa pods would have same flexibility than pip from python. – Guilherme Pedriconi Apr 17 '20 at 17:17
  • yeah, I wish so, too. – HalR Apr 17 '20 at 19:22