2

I have a custom framework (not using pods or carthage). Swift on my mac is 4.0.3. On compiling the project I get the error :

Module compiled with swift 4.0 cannot be imported in Swift 4.0.3

I know this topic has been discussed quite a bit like here. However, in my case the, the framework has been added manually.

Nitish
  • 13,845
  • 28
  • 135
  • 263
  • Please check this post: [Module compiled with Swift 4.0 cannot be imported in Swift 4.0.1](https://stackoverflow.com/questions/46726077/module-compiled-with-swift-4-0-cannot-be-imported-in-swift-4-0-1) – Kevinosaurio Dec 12 '17 at 13:05
  • @Kevinosaurio : Already checked. Removing derived data doesn't help. Also, my Xcode is latest. – Nitish Dec 12 '17 at 13:08
  • is you Xcode **Tools** 9.1? – Kevinosaurio Dec 12 '17 at 14:25
  • @Kevinosaurio : Left with no option other than downloading Xcode 9.0 – Nitish Dec 12 '17 at 16:01
  • Possible duplicate of [Module compiled with Swift 4.0 cannot be imported in Swift 4.0.1](https://stackoverflow.com/questions/46726077/module-compiled-with-swift-4-0-cannot-be-imported-in-swift-4-0-1) – Zig Jun 07 '18 at 17:03

1 Answers1

2

You need to recompile the framework with swift 4.0.3 before adding it to your project.

colmlg
  • 193
  • 6