0

My project is working on Xcode 10.1, but when I am trying to work with Xcode 10.2.1, I got this issues:

"Module compiled with Swift 4.2 cannot be imported by the Swift 5.0.1 compiler: /xxx/xxx/xxx/xxx/xxx/xxx/xxx.framework/Modules/xxx.swiftmodule/i386.swiftmodule"

"Module compiled with Swift 4.2 cannot be imported by the Swift 5.0.1 compiler: /xxx/xxx/xxx/xxx/xxx/xxx/xxx.framework/Modules/xxx.swiftmodule/x86_64.swiftmodule"

I am getting this issues about embedded framework that I am using. When I checked the same issues, I didn't find any solutions on internet. Do you guys have any idea?

Thanks.

talate93
  • 31
  • 1
  • 2
  • Your embedded framework has to be recompiled. Also note that after Xcode 11 we won't have this kind of problems any more before of the incoming ABI stability. – Sulthan Jun 20 '19 at 07:01

3 Answers3

0

You have to recompile all of your dependencies with the same version of the compiler by Clean All -> Build. Also make sure that Locations -> Command Line Tools is set to the latest Xcode 10.2.1 if you have both versions installed side-by-side.

Kate Orlova
  • 3,225
  • 5
  • 11
  • 35
0

I understand this is an external module/framework.

If you don’t have access to the source files then you need to request the vendor to update the framework, i.e., compile it with Swift 5.

If that is not possible then you need to keep your project on Swift 4.2 until further...

Cheers!

Jens Schwarzer
  • 2,840
  • 1
  • 22
  • 35
0

Change your Swift Language Version from build setting.

Go to YourTarget > Build Settings > Swift Language Version for all of your Xcode targets.

Hope this will work.

Vikas Rajput
  • 1,754
  • 1
  • 14
  • 26