Quick project with Cocoapods dependencies

I have the following 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

      

I am also using cocoapods 0.37.2. For some reason, when I try to run the application, it complains about the following error when I clearly state that my project requires SwiftyJSON 2.2.0 or higher:

 Reason: Incompatible library version: Foo requires version 2.0.0 or later, but SwiftyJSON provides version 1.0.0

      

I have verified that there are no other SwiftyJSON dependencies (using 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)

      

As you can see, nobody is pulling SwiftyJSON 1.0.0. BTW, the reason I am using cocoapods 0.37.2 is because of this error when I was trying to use 0.38.1: https://github.com/CocoaPods/CocoaPods/issues/3890 .

Am I missing anything here (regarding the SwiftyJSON version mismatch)? I've tried cleaning the project, redoing the pod installation, etc. with no luck.

Thanks in advance!

+3


source to share


1 answer


For me (and for you it seems) the following worked:

  • Remove wine containers from podfile (in my case AFNetworking

    and AFNetworkActivityLogger

    )
  • pod install

    to erase them.
  • Update (or downgrade if you are on 0.38.1), on cocoapods 0.38.0
  • Add containers back and pod install



Now I'm back in business ... I believe 0.38.1 was responsible for getting myself into this mess.

+1


source







All Articles