Module Compiled with Swift 4.0 Cannot Be Imported in Swift 3.0.2

Module compiled with swift 4.0 cannot be imported in swift 3.0.2

Try cleaning the project from Product -> Clean in Xcode 8 and build again.

Module compiled with Swift 4.0 cannot be imported in Swift 3.2.2: AudioKit

First If you update the Xcode the Xcode-> preferences-> LocationsTab and change the command line tolls Xcode version.. Now check here
AudioKitReleases

pod 'AudioKit', '~> 4.0.3' 

AudioKit V4.0.3 for Xcode 9.1 Pod version according to your Swift language, and update your AudioKit pod by command pod update AudioKit

Module compiled with Swift 3.0 cannot be imported in Swift 2.3

You'll need to change the Use Legacy Swift Language Version to NO - this makes sure your project will use swift 3.

If you want to package your project as a POD (for cocoapods) you'll need to add a file named .swift-version (containing 1 single line, "3.0").
This will tell cocoapods to use the swift 3 compiler.

Everything should work after this changes.

Module compiled with swift 3.0 cannot be imported in Swift 3.0.1

SwiftyJson is being downloaded precompiled by carthage. The precompiled download is with Swift Version 3.0. That makes the compiler complain that the version is not correct. Using the following command:

carthage update --platform iOS --no-use-binaries

SwiftyJson (and all other frameworks within Carthage) will be compiled locally using the local version of Swift (3.0.1) and the compiler will not complain anymore.



Related Topics



Leave a reply



Submit