Swift Version Conflict: this SDK is not supported by the compiler, Please select a toolchain which matches the SDK

Viewed 6535

I'm using xCode 13.1 with macOS 12.0.1 Monterey. I added KingFisher and removed it from my pod. but my project is not built anymore. I got this error for one of my local SDKs:

Failed to build module 'CbSdk';
this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.4
(swiftlang-1205.0.26.9 clang-1205.0.19.55)', while this compiler is 'Apple Swift version 5.5.1 
(swiftlang-1300.0.31.4 clang-1300.0.29.6)'). Please select a toolchain which matches the SDK.

What I've done but didn't work:

  • pod deintegrate and pod install.
  • restart xCode with clearing cache and DerivedData.
  • checkout old branch and commit that worked before.
  • moving code to another macBook that worked before.
  • download, install and select toolchain 5.4 (odd errors appeared -> )
  • changing swift compiler language of my target and project to swift 4 (It says you are using swift 5.5.1 again!)
  • note that I didn't update xcode or swift!
1 Answers
Related