Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alamofire compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64

When I move my program to the XCode8, I got this error: Alamofire compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64. I have update Alamofire to version 4.0, and set the Use Legacy Swift Language Version to NO. What's the matter?

like image 594
Tony_Liu Avatar asked Sep 23 '16 09:09

Tony_Liu


3 Answers

Update your cocoa pods and clear your derive data folder and try to run again.

In xcode 8 derived data folder changed,

Go to File -> Workspace setting -> then see this image,

enter image description here

Click on -> on path and clear that derived data folder.

like image 56
KAR Avatar answered Nov 15 '22 07:11

KAR


Uninstall pods and install it again. Use below commands to install the pods in app

1) pod repo update (make sure you are at root folder)

2) sudo gem install cocoapods --pre (make sure you are at root folder)

3) move to your application folder and run following command:

pod init

4) pod install

Remove derived data folder, clean the app and run it.

like image 29
Himanshu Mahajan Avatar answered Nov 15 '22 07:11

Himanshu Mahajan


If you are using Carthage, try run:

carthage update --no-use-binaries
like image 37
DàChún Avatar answered Nov 15 '22 08:11

DàChún