swift 5.1 & Xcode 11

I feel confused — there is no Swift 5.1 option in project/target settings in Xcode 11. I can create SwiftUIView, but not able to select Swift 5.1 and try new features. What am I doing wrong?

Replies

Swift 5.1 comes with Xcode 11 and you have no need to touch any settings.


not able to ... try new features

You need macOS 10.15 Catalina to try some features supporting SwiftUI, for example, live preview or editing in Canvas does not work in macOS 10.14.

Are you using Xcode 11 on macOS Catalina?

Yes, Catalina. Ok, confusion resolved. I was trying to use "some" keyword in template param and it is not recongnised comparing to other places where it cannot be used. Also, I was trying to replicate URLSession dataTaskPublisher example from Advances in Networking part 1 session and seems dataTaskPublisher is not available. Everything else is working as expected, however there is no 5.1 option (as exists for 4.2) in Swift version selection as it is expected 5.0 sources will be compatible with 5.1.