我正在关注 this tutorial并试图获得 starter project运行。当我打开项目时,我看到了这些警告:
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.
在运行这个程序时停止执行,我得到这个错误
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.
我正在使用 Xcode 9 beta。我该如何解决这个问题并让项目运行?
最佳答案
您的项目可能有 swift 2.0
、swift 2.1
或 swift 2.2
版本,因此 Xcode 9
或更高版本不支持那个版本。而且它也不能将 swift 2.x
的语法转换为 swift 4
请记住,xcode 9
或更高版本默认具有 swift 4
版本。
在 Xcode 8
8.1、8.2 或 8.3 中打开此项目,您的项目将成功运行。
关于ios - 不支持的 Swift 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46080657/