I have downloaded XCode 11 from the apple website and I am trying to upgrade my code to Swift 5.1 but XCode isn't giving met that option. Also, I don't see iOS 13 simulators available. I have never had this problem before so what am I missing? My OS was updated to MacOS Catalina
Asked
Active
Viewed 5,537 times
29
-
It is 5.1, SwiftUI is build on top of the Swift 5.1 and it depends on the many key futures it like Property wrapper, builders, etc. – Mojtaba Hosseini Aug 12 '19 at 16:05
1 Answers
41
First of all note that the "Swift Language Version" dropdown doesn't select a compiler version, but rather a compatibility mode for the compiler to run in (more on that here).
Arguably the dropdown menu is mislabelled in this case, as the "Swift 5" option really means "Swift 5.1" in Xcode 11. This can be demonstrated by running the following:
#if swift(<5.1)
print("Less than 5.1")
#else
print("At least 5.1")
#endif
You'll see that At least 5.1
gets printed. Interestingly this means that there's actually no way to run a 5.1 compiler with a compatibility language version of 5.0.

Hamish
- 78,605
- 19
- 187
- 280
-
15This is confusing, since Xcode does make a distinction between Swift 4 and 4.2. When I installed Xcode 11, I expected to see Swift 5.1, not Swift 5. – Greg Brown Sep 24 '19 at 21:23
-
3@Greg Brown i guess there won’t be options > 5.0 because there is abi stability starting From 5.1 ) – protspace Oct 03 '19 at 19:10
-