File Realm - module was created by an older version of the compiler

I am using the latest version of xcode and swift 2.2. One of my projects, which I did not open for a few months, not down, because of an error module file was created by an older version of compiler of compiler

I tried the following

  • Removed the environment framework from the project, and then download the latest version from realm.io and copy the new frameworks into the project
  • Construction area build.sh build sources github via REALM_SWIFT_VERSION=2.2 and adding to the project

None of them helped, still got an error.

Any tips?

+3
source share
3 answers

Can you try the following?

  • Delete derived data
  • Empty the build folder (click the Xcode product menu while holding down the Option key and select the "Clean Build Folder" menu item).

Sometimes you just perform a clean build is not enough to clean up harmful intermediates or cached data.

+7
source

I had this problem when upgrading from Swift 2.2 to Swift 3.0, specifically for Cocoapod Realm Swift. I think this solution should work for this common problem. Here's what worked for me:

(1) Go to the derived data folder / Users / (yourUserName) / Library / Developer / Xcode / DerivedData p>

(2) Select a project with an error

(3) Remove

(4) Clean Project

(5) Run

Housekeeping initially did not work for me. Hope this helps!

+2
source

I encountered the same problem when using Swift 3.2 in my project. After upgrading to Swift 4.0, the problem disappeared. Clearing the project folder, received data, restarting the Mac - nothing helped.

0
source

All Articles