Reputation: 6723
I use latest version of xcode and swift 2.2. One of my projects, which I havent open for several month now not building, because of error
module file was created by an older version of compiler
I tried the following
build.sh build
from github sources with REALM_SWIFT_VERSION=2.2
and adding to projectNeither of these helped, still got error.
Any advices ?
Upvotes: 3
Views: 3101
Reputation: 5945
I faced the same issue when used Swift 3.2 in my project. After upgrading to Swift 4.0 issue disappeared. Cleaning project folder, derived data, restarting Mac - nothing helped.
Upvotes: 0
Reputation: 131
I had this issue when upgrading from Swift 2.2 to Swift 3.0, specifically for Realm Swift cocoapod. I think this solution should work for this general issue. Here is what worked for me:
(1) Go to derived data folder /Users/(yourUserName)/Library/Developer/Xcode/DerivedData
(2) Select project with error
(3) Delete
(4) Clean project
(5) Run
Cleaning initially did not work for me. Hope this helps!
Upvotes: 2
Reputation: 1787
Can you try the following?
Sometimes simply performing a clean build isn't sufficient to flush the invalid intermediate products or cached data.
Upvotes: 7