A module compiled with fast 3.1 cannot be imported into Swift 3.0.2

Swift 3.1 appeared, and I get this error message in my project:

A module compiled using swift 3.1 cannot be imported into Swift 3.0.2

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

+5
source share
3 answers

You probably include third-party structures / libraries. This is what you need to update / recompile. If you are using Carthage or Pods, you just need to rebuild these libraries and make them available for your application. The problem is not your code. When you compile it, it compiles in 3.1

+8
source

etayluz

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

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

carthage update --no-use-binaries 
+3
source

These steps have helped me.

This happens sometimes when your Xcode does not support a specific version of third-party dependencies. Try using the correct version of third-party dependencies compatible with the Xcode version.

  • Clear the received data in Xcode. Xcode โ†’ File โ†’ Workspace Options โ†’ Click the gray arrow icon next to the derived data.
  • Check the carthage version by running the carthage version . It should be above 0.20.0. Run carthage update --platform iOS --no-use-binaries in your terminal. Allows you to get rid of compatibility issues.
  • Clean up the project. Command + Shift + K. Then run and run.
+1
source

Source: https://habr.com/ru/post/1266377/


All Articles