Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module compiled with swift X.1 cannot be imported in Swift X.0.2

Swift 3.1 came out and I'm receiving this error message in my project:

Module compiled with swift 3.1 cannot be imported in Swift 3.0.2

So how do I tell Xcode to start updating my project and migrate it to Swift 3.1?

like image 381
etayluz Avatar asked Apr 05 '17 18:04

etayluz


Video Answer


2 Answers

It is likely that you are including 3rd party frameworks/libraries. Those are what need to be updated/recompiled. If you are using Carthage or Pods you should just rebuild those libraries and make them available to your app. The problem isn't your code. When you compile it, it will compile to 3.1

like image 51
Mozahler Avatar answered Oct 13 '22 04:10

Mozahler


etayluz

Upgrade your Xcode to 8.3 and your Swift version will be 3.1

I use Carthage to update library/framework again, with option --no-use-binaries

carthage update --no-use-binaries
like image 45
VitDuck Avatar answered Oct 13 '22 04:10

VitDuck