Sometimes, the application’s running environment or the OS version supported by a particular library (framework) necessitates using an older version of Xcode.
While using such an older version of Xcode, I sometimes wondered what Swift language versions are supported, so I looked it up.
About Swift Version Compatibility
In its early days, Swift did not offer compatibility with code from versions earlier than Swift 4 due to significant updates and the lack of ABI stabilization. As a result, it was impossible to use frameworks targeting different versions.
However, the situation has changed significantly at the time of this writing. Since Swift 4, you can combine frameworks targeting different language versions.
However, some features are not available in older versions of Swift.
About Swift Concurrency
Concurrency requires Swift 5.5 or later and the Swift standard library for the concurrency type. Therefore, on Apple platforms, you must set the Deployment Target to at least the following values.
OS | Deployment Target |
---|---|
iOS | 13 |
macOS | 10.15 |
tvOS | 13 |
watchOS | 6.0 |
System Requirements for Xcode
The system requirements for each version of Xcode are summarized on the following page.
Swift 5.x
The Xcode versions that support Swift 5.x are as follows.
Swift Version | Xcode Version |
---|---|
5.10 | Xcode 15.3 |
5.9 | Xcode 15 |
5.8.1 | Xcode 14.3.1 |
5.8 | Xcode 14.3 |
5.7 | Xcode 14 |
5.6 | Xcode 13.3 |
5.5 | Xcode 13.0 |
5.4 | Xcode 12.5 |
5.3 | Xcode 12.0 |
5.2 | Xcode 11.4 |
5.1 | Xcode 11.2 |
5.0 | Xcode 10.2 |
Apple introduced Xcode 10.2 around the time of macOS Mojave 10.4, so you can see that Swift 5.x has come a long way over the years.
Swift 4.x
The Xcode versions that supports Swift 4.x are as follows.
Swift Version | Xcode Version |
---|---|
4.2 | Xcode 10.0 |
4.1 | Xcode 9.3 |
4.0 | Xcode 9.0 |
Swift 3.x
The Xcode versions that supports Swift 3.x are as follows.
Swift Version | Xcode Version |
---|---|
3.1 | Xcode 8.3 |
3.0 | Xcode 8.0 |
Swift 2.x
The Xcode versions that supports Swift 2.x are as follows.
Swift Version | Xcode Version |
---|---|
2.2 | Xcode 7.3 |
2.1 | Xcode 7.1 |
2.0 | Xcode 7.0 |
Swift 1.x
The Xcode versions that supports Swift 1.x are as follows.
Swift Version | Xcode Version |
---|---|
1.2 | Xcode 6.3 |
1.1 | Xcode 6.1.1 |
1.0 | Xcode 6.0 |