After updating to Xcode 11.2.1, I cannot import AudioKit without getting this error: "Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler". I've said yes to "Build libraries for distribution" but still getting the same error. Is there a way of fixing this error? Thanks!
Asked
Active
Viewed 6,460 times
0
-
1yes, this happened because the module doesn't built by the new version of Xcode, you need come back previous version of Xcode to resolve this. entry in (https://developer.apple.com) in the section of downloads and choose Xcode version 11. – Andres Gomez Nov 21 '19 at 23:30
-
You have to compile AudioKit yourself with Xcode 11.2.1. There is multiple solutions: you can use the shell script ./build_frameworks.sh in Frameworks folder, "carthage update" if you are using it, embed the AudioKit iOS project into your own, ... If you are using the shell script or Carthage, be sure to have the proper version of Xcode command line tools selected in Xcode -> Preferences -> Location. – MathieuLescure Nov 22 '19 at 15:35
-
@AndresGomez Downloading the older version seemed to be the best option, Thank you! – Craig Verveen Nov 22 '19 at 19:57
3 Answers
1
To fix this problem properly you have to wait for AudioKit to bring out an updated version which only took a few days.

Craig Verveen
- 31
- 1
- 8
1
If you are using Carthage to import AudioKit, try carthage update --no-use-binaries
.

iMoeNya
- 672
- 4
- 11
0
The library (not the app) needs to set the build setting "Build libraries for distribution" so that it exports the necessary interface file to enable linkage across different Swift versions.

Garvan Keeley
- 187
- 10