Cody Lucas Cody Lucas - 1 year ago 222
iOS Question

Realm's Swift module compiled with Swift 3.0 cannot be imported in Swift 3.0.1

I just started using Realm 2.0.4 yesterday with Xcode 8 and it worked fine. Today I updated to Xcode 8.1 and it no longer will compile. I get an error saying "Module compiled with Swift 3.0 cannot be imported in Swift 3.0.1."

How can I fix this? I have deleted Realm.framework and RealmSwift.framework from the embedded framework table and dropped in the 3.0.1 version, but the issue persists. I have deleted the DerivedData folder and it didn't work.

What do I do? I am not using CocoaPods or Carthage.

Answer Source

Just for future reference, a bunch of things that you can try:

  • Clean the build folder (Go to the Xcode Product menu while holding down the Option key, then choose Clean Build Folder...)
  • Completely reinstall Realm by deleting the framework files from the project, copying them in again, and re-adding them to the Embedded Binaries and Linked Frameworks and Libraries project settings.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download