Ariel Gemilang
Ariel Gemilang

Reputation: 791

Swift Compiler Error on Pods

I made single view application and install pods. I'm using Alamofire, SwifttyJSON,HanekeSwift, and RealmSwift. after the installation, i open .xcworkspace and then get so many errors like this

enter image description here

I trying Reinstalling Pods and also removing SwiftyJSON but another errors comes up. And my group Pods looks like this

enter image description here

How I can fix this?

Upvotes: 7

Views: 16973

Answers (2)

Parth Adroja
Parth Adroja

Reputation: 13514

I guess you are using a lower version of Xcode and swift is lower while current alamofire and swiftyjson are updated to support xcode 8+ and swift 3.0 or above. You will need to use specific pod to use it in lower xcode.

To go to specific version of pod you need to do it like this

pod 'Alamofire', '3.1.2'

else if you use like 'Alamofire' or 'Alamofire', '~> 3.1.2', it will take latest version in the first case and in second latest minimum version 3.1.2, so you will not get the exact version you want try the above i mentioned.

Upvotes: 8

Jacob King
Jacob King

Reputation: 6157

Try this:

  1. Open terminal.
  2. cd to your project directory.
  3. Run rm -rf Pods.
  4. Run pod install.

If the above does not work please paste your Podfile so I can assist you further.

Upvotes: 2

Related Questions