Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 589
Ariel Gemilang Avatar asked Oct 14 '16 10:10

Ariel Gemilang


2 Answers

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.

like image 100
Parth Adroja Avatar answered Sep 27 '22 22:09

Parth Adroja


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.

like image 25
Jacob King Avatar answered Sep 27 '22 22:09

Jacob King