Unsupported Swift Version

5.6k views Asked by At

I am following this tutorial and am trying to get the starter project to run. When I open the project, I see these warnings:

Unsupported Swift Version
The target “SocketChat” contains source code developed with Swift 2.x. Xcode 9 does not support building or migrating Swift 2.x targets.

Use Xcode 8.x to migrate the code to Swift 3.

On running this program stops executions and I get this error

Dependency Analysis Error Group
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.

I am using Xcode 9 beta. How can I resolve this issue and get the project running?

1

There are 1 answers

0
Xcodian Solangi On

Your project possibly has swift 2.0, swift 2.1 or swift 2.2 version so Xcode 9 or later does not support that versions. and neither it can convert the swift 2.x's syntax to swift 4

Remember that xcode 9 or later has swift 4 version by default.

Open this project in Xcode 8 8.1, 8.2, or 8.3 your project will run successfully.