I am creating the Xcframework manually on my system with BUILD_LIBRARY_FOR_DISTRIBUTION= Yes. If I integrate it locally with my test app, then it works fine, but when I push it over remote, then it gives me the below-defined error.
Tools and version I am using:
Xcode 15.0.1,
Swift version 5.9.0
**Exact Error over the Azure Pipeline : **this SDK is not supported by the compiler (the SDK is built with ‘Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)’, while this compiler is ‘Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)’).
and i have seen over the developer portal that 5.7.2 is supported by Xcode14.2.
I tried with this BUILD_LIBRARY_FOR_DISTRIBUTION = Yes but it didn’t helped me
2
Answers
I got the alternative solution by installing Swift 5.7.2 and selecting 5.7 in ToolChain, and it worked for me.
For installing the specific Swift version: https://shawnbaek.com/2020/09/20/how-to-use-an-older-version-of-swift-on-xcode-12/
Look closely at what the error says:
The SDK needs Swift 5.9 but the installed compiler can only do 5.7.
So, as Swift 5.9 requires Xcode 15 and you’re running Xcode 14.2 on the pipeline, you should change your pipeline job to use Xcode 15 instead. You might need to run
xcode-select
in your job to switch to the newer Xcode version before building.