Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module file was created by an older version of the compiler

Using Carthage to manage my dependencies, everything runs fine in the simulator.

However, when building for a device I get the following error:

enter image description here

Module File was created by an older version of the compiler; rebuild Alamofire and try again: .../DerivedData/Build/Products/Debug-iPhones...

I have tried what others suggested to similar issues: deleting my derived data, reinstalling Carthage and rebuilding the frameworks. However, the error has been persistent.

like image 399
vikzilla Avatar asked Apr 16 '16 07:04

vikzilla


2 Answers

Are you using the right version of xcodebuild? What do you see when you run xcode-select -p? It should be pointed at Xcode 7 if you want to use the frameworks in Xcode 7.

Remove all the derive data rm -rf ~/Library/Developer/Xcode/DerivedData/ && carthage build

Also, When you use carthage update without --no-use-binaries option then it downloads the pre built frameworks which may be built using the old version of xcodebuild.

Alternative way is to use carthage update --no-use-binaries. This way it will compile all the frameworks with the latest Xcode build installed on your Mac.

like image 71
Rahul Katariya Avatar answered Oct 31 '22 13:10

Rahul Katariya


I am using cocoapods.I just right-click the wrong framework,show it in Finder,remove it,and build the project again,solve the problem.

like image 35
Tungkay Avatar answered Oct 31 '22 12:10

Tungkay