admin管理员组

文章数量:1355658

I was trying to run ios of my Flutter app with an older toolchain(5.9.2) as a package Im using has thrown error while running with latest toolchain after updating ios SDK, Xcode, MacOS for recent requirement for deployment.

<project-path>/ios/Runner/Liveness/LivenessChannel.swift:9:8
Failed to build module 'EFRSDK';
this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.9.2
(swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)', while this compiler is 'Apple Swift version 6.0.3 
effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which 
matches the SDK.

I couldn't get latest version of the SDK

Tried changing swift language version under Swift compiler - language to lower(4),

Im using

Xcode 16.2

swift-driver version: 1.115.1

Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)

I was trying to run ios of my Flutter app with an older toolchain(5.9.2) as a package Im using has thrown error while running with latest toolchain after updating ios SDK, Xcode, MacOS for recent requirement for deployment.

<project-path>/ios/Runner/Liveness/LivenessChannel.swift:9:8
Failed to build module 'EFRSDK';
this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.9.2
(swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)', while this compiler is 'Apple Swift version 6.0.3 
effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which 
matches the SDK.

I couldn't get latest version of the SDK

Tried changing swift language version under Swift compiler - language to lower(4),

Im using

Xcode 16.2

swift-driver version: 1.115.1

Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)

Share Improve this question asked Mar 28 at 6:30 ShanuShanu 6671 gold badge5 silver badges28 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Man! So I think you should use the swift Version 5.9.2 toolchain, you can do this on several ways like try :

sudo xcode-select -s /Library/Developer/Toolchains/swift-5.9.2.xctoolchain

Then

swift --version

To ensure that you are running on 5.9.2 and I hope it will resolve the issue.

If it still haven't solved the issue try to downgrade your Xcode to version 15.something. I hope these steps will fix your issues. Best of luck.

本文标签: iosXcode building stucks while running with older version of toolchainStack Overflow