1

I'm trying to import a framework in app, after to update Xcode to version 9.3 that supports swift 4.1. When I import it, appears this error:

Module compiled with Swift 4.0.3 cannot be imported in Swift 4.1: /Users/mgutierrezd/Desktop/Lapso/FrameworkAsesorEnLinea.framework/Modules/FrameworkAsesorEnLinea.swiftmodule/arm64.swiftmodule

I Tried to delete derived data, but it doesn't work.

jscs
  • 63,694
  • 13
  • 151
  • 195
Mateo G
  • 21
  • 3
  • The "module" needs to be rebuilt using Xcode 9.3/Swift 4.1 - are you using Pods or Carthage or is it a custom or third part library – MadProgrammer Apr 03 '18 at 23:56
  • This is because Swift does not have [module stability](https://github.com/apple/swift-evolution) yet and there's a high chance that it WILL NOT come in Swift 5 either. You will have to recompile your framework in Swift 4.1 – Code Different Apr 04 '18 at 00:08
  • I'm using Pods inside my framework. – Mateo G Apr 04 '18 at 14:08
  • Were you able to fix this @MateoGutierrezDiaz ? I am running into the same issue. – anon_nerd Apr 20 '18 at 13:52

1 Answers1

0

When compiling an application using Swift 4.1, your frameworks need to be compiled using Swift 4.1 as well. Recompile your frameworks and you will solve this problem.

Charles Srstka
  • 16,665
  • 3
  • 34
  • 60