the compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)

We are creating a framework using Xcode and it is working fine with Xcode 12.1 but not working on Xcode 12.2 & above.
When the adopter app imports the framework file it shows the below error
The compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Your framework wasn't built with Library Evolution enabled, so different versions of the compiler can't use the binary.

There are two options to handle these situations:
  1. Ensure the framework is built from source as part of the app's build by configuring the project dependencies. See TN 2435. Alternatively, convert the framework to a Swift package, and integrate the package into your app through Swift Package Manager and built from source as an app dependency that way.

  2. If the framework needs to be built and versioned separate from the app, build the framework as an XCFramework with Library Evolution enabled and distribute the XCFramework. To learn about XCFrameworks, start with the WWDC session about them.

I ended up on this thread while googling an error with a similar message and log.

In my case, I got the error while working on building a library with CocoaPods and the fix was to add XCTest to the list of linked frameworks.

# CombineTestHelpers.podspec

Pod::Spec.new do |s|
  # ...
  s.framework = 'XCTest'
  # ...
end

You can find the full .podspec here.

I'm not sure how relevant this is for this particular issue, but hopefully it can provide some inspiration. 🤞

the compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
 
 
Q