module compiled with swift 5.3.2 cannot be imported by the swift 5.5.2 compiler

Hello, When trying to open a project written in approximately August in xcode 13.2.1 version, I get the error 'module compiled with swift 5.3.2 cannot be imported by the swift 5.5.2 compiler'. As you can see in the attachment, I get 127 errors when I run it with the 5.3.2 toolchain. How can I upgrade an existing project to version 5.5.2? Thank you in advance for your help

Please see my answer in another thread.

i see it but i am already built from source as a part of project.If you add me on discord I can show you my problem in more detail and maybe you can help. i really need it Hazni#7481

I'm using cocoapods-binary-cache and I'm getting the same error as yours. There is no problem when building with the actual device, but an error occurs when building with the simulator as a target.

Module compiled with Swift 5.3.2 cannot be imported by the Swift 5.5.2 compiler

Environment:

  • Xcode 13.2.1 (13C100)
  • Using a Mackbook Pro (M1 Pro, 10 Core)
  • swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
  • Target: arm64-apple-macosx12.0
  • No additional Swift use with other Xcode or Toolchain.

I have faced the same error. An actual device works well but the emulator makes problem.

The errors

<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios12.0'
<unknown>:0: error: module compiled with Swift 5.4 cannot be imported by the Swift 5.5.2 compiler: 

And I tried to change my swift version(5.5.2 -> 5.4) on Xcode via ToolChain, but it does not work.

Environment

  • Xcode: 13.2.1 (13C100)
  • MacBook Pro (MacBook Pro (13-inch, M1, 2020))
module compiled with swift 5.3.2 cannot be imported by the swift 5.5.2 compiler
 
 
Q