Alamofire: Module file was created by an older version of the compiler

Created on 21 Jun 2016  ·  3Comments  ·  Source: Alamofire/Alamofire

I am trying to upgrade a tvOS project to XCode 8 and Swift 3 to start integrating the latest APIs. My project depends on Alamofire and AlamofireImage. I switched to the swift3 branch on both those dependencies. Then I ran pod install and I opened my workspace in XCode, and I ignored the conversion wizard since my own code has already been migrated to Swift 3. Now when I try to build my project, I'm getting the following compiler error on the 'import Alamofire' statement:

/Users/sarbogast/dev/tvoxx-ios/TVoxx/SpeakerCollectionViewCell.swift:10:8: Module file was created by an older version of the compiler; rebuild 'AlamofireImage' and try again: /Users/sarbogast/Library/Developer/Xcode/DerivedData/Build/Products/Debug-appletvsimulator/AlamofireImage.framework/Modules/AlamofireImage.swiftmodule/x86_64.swiftmodule

Any idea how to fix this?

support

Most helpful comment

You probably need to delete ~/Library/Developer/Xcode/DerivedData to clear out your old build products.

All 3 comments

You probably need to delete ~/Library/Developer/Xcode/DerivedData to clear out your old build products.

Wow, @jshier Thank You!!! I've been screwing around with stuff in a massive project for 2 hours and deleting the derived data finally fixed everything!!!

Also if you use Cocoa Pods you have to do a pod deintegrate and pod update to reinstall the frameworks.

Was this page helpful?
0 / 5 - 0 ratings