在 Xcode 8 中使用 Swift 2.2?
Use Swift 2.2 in Xcode 8?
是否可以在 Xcode 8 中使用 Swift 2.2?
来自 Xcode 8 个发行说明:
"Xcode 8 supports switching toolchains, such as those from swift.org,
without relaunching Xcode. (23135507)"
我一直试图在 swift.org 网站上找到 swift 2.2 工具链,但找不到。是否有人成功配置 Xcode 8 以与 swift 2.2
一起使用
如果您想在 Xcode 8 中继续使用 Swift 2,则通过启用 使用旧版 Swift 语言来使用 Swift 2.3版本 构建设置 (SWIFT_VERSION = 2.3
).
在 Xcode 8 中使用 Swift 2.3 by That Thing in Swift 很好地介绍了在 Xcode 8.
中使用 Swift 2.3
以下内容转自文章:
There’s a single build setting that will let you continue building
your Swift projects with a Swift version that’s mostly similar in
syntax to your existing projects from Xcode 7: Use Legacy Swift
Language Version
Just drop into your project’s build settings and search for legacy
swift to find the correct build setting, then switch the setting to
YES to opt-in to Swift 2.3 rather than Swift 3 in Xcode 8.
无法在XCode8中使用Swift2.2,在XCode3中也无法使用Swift2.3或Swift3。
作为此问题的可能解决方案之一,我建议并排安装两个版本的 Xcode(例如 7.3.1 和 8)。
要做到这一点,您应该:
- 从 Downloads for Apple Developers 下载合适的 dmg 文件。使用搜索查找 Xcode.
- 双击此文件可以看到熟悉的“将 Xcode 拖到您的应用程序文件夹中安装”window。但是暂时将其拖到其他地方。台式机就好了。将其重命名为 Xcode \版本号\(如 Xcode 7.3.1),然后将其拖至应用程序文件夹。
就是这样。
无法在 XCode8 中使用 Swift2.2,方法是在构建设置中将使用旧 Swift 语言版本设置为是。
是否可以在 Xcode 8 中使用 Swift 2.2?
来自 Xcode 8 个发行说明:
"Xcode 8 supports switching toolchains, such as those from swift.org, without relaunching Xcode. (23135507)"
我一直试图在 swift.org 网站上找到 swift 2.2 工具链,但找不到。是否有人成功配置 Xcode 8 以与 swift 2.2
一起使用如果您想在 Xcode 8 中继续使用 Swift 2,则通过启用 使用旧版 Swift 语言来使用 Swift 2.3版本 构建设置 (SWIFT_VERSION = 2.3
).
在 Xcode 8 中使用 Swift 2.3 by That Thing in Swift 很好地介绍了在 Xcode 8.
中使用 Swift 2.3以下内容转自文章:
There’s a single build setting that will let you continue building your Swift projects with a Swift version that’s mostly similar in syntax to your existing projects from Xcode 7: Use Legacy Swift Language Version
Just drop into your project’s build settings and search for legacy swift to find the correct build setting, then switch the setting to YES to opt-in to Swift 2.3 rather than Swift 3 in Xcode 8.
无法在XCode8中使用Swift2.2,在XCode3中也无法使用Swift2.3或Swift3。
作为此问题的可能解决方案之一,我建议并排安装两个版本的 Xcode(例如 7.3.1 和 8)。
要做到这一点,您应该:
- 从 Downloads for Apple Developers 下载合适的 dmg 文件。使用搜索查找 Xcode.
- 双击此文件可以看到熟悉的“将 Xcode 拖到您的应用程序文件夹中安装”window。但是暂时将其拖到其他地方。台式机就好了。将其重命名为 Xcode \版本号\(如 Xcode 7.3.1),然后将其拖至应用程序文件夹。
就是这样。
无法在 XCode8 中使用 Swift2.2,方法是在构建设置中将使用旧 Swift 语言版本设置为是。