SwiftSocket
SwiftSocket copied to clipboard
Build for macOSX error: SWIFT_VERSION '3.0' is unsupported
Build env: Xcode 11.5, macOS Catalina 10.15.5, error details below.
Build with Carthage: carthage update --platform ios,macosx
error: SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'SwiftSocket macOS' from project 'SwiftSocket')
When I change Swift Language Version
to Swift 4
, it can build without error.
it seems relate to this https://github.com/swiftsocket/SwiftSocket/issues/174
I faced this issue as well as you. In my case, changing Swift version from 5 to 4 did not clear this error.
This project is dead now due to Apple's genius move of not-backward-compatible modus? So somewhere in the universe there is an old Xcode waiting to convert your Swift3 to 4. Your mission is to seek the guru who knows where this mythical creature lies.
I fixed this once like this:
` # The easy way to use sockets on Apple platforms - https://github.com/swiftsocket/SwiftSocket
Temporary solution because of using still Swift 3 in pod 2.0.2, see https://github.com/swiftsocket/SwiftSocket/pull/186
pod 'SwiftSocket', :git => 'https://github.com/swiftsocket/SwiftSocket.git', :branch => 'master'`
I meet the same issue, changing Swift version from 3.x to 5.x fix it.
iOS 14, Xcode 12.
@Haibo-Zhou 's steps worked for me too. I had a job finding where Swift version was! It can be found here:
Pods > TARGETS > SwiftSocket > Swift Compiler - Language