Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have just updated xCode to the latest version, and am getting the error when trying to build.

"Module compiled with Swift 4.0 cannot be imported in Swift 3.2.2: /Users/james/Documents/MyApp/Pods/AudioKit/iOS/AudioKit.framework/Modules/AudioKit.swiftmodule/x86_64.swiftmodule"

It was working before I upgraded the latest xCode.

like image 333
james Avatar asked Nov 10 '17 04:11

james


2 Answers

The error message is telling you that Xcode 9.1 is using Swift 3.2.2, while the Swift framework you're building against was built for Swift 4.0 (using Xcode 9.0). You need to update your frameworks to versions built for the version of Swift that you're using.

like image 104
Khushbu Desai Avatar answered Nov 15 '22 05:11

Khushbu Desai


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

like image 32
Aman Gupta Avatar answered Nov 15 '22 05:11

Aman Gupta