Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

What’s New in Swift 4.2?

Swift 4.2 is finally out! This article will take you through the advancements and changes the language has to offer in its latest version.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5357-what-s-new-in-swift-4-2

allCases in Enums is :ok_hand: :tada:

How do you get it? I downloaded the new beta and the beta Xcode but all I have is swift 4.1.2 when I check with Terminal, swift -v

I tried some of the ML examples from the WWDC videos and one of the last example didn’t work. I noticed in the video they were using v4.2

Thanks

Update:

It does come with Xcode beta 10L176w after all. I selected it in Xcode beta > Preferences > Locations > Command Line Tools > Xcode 10.0 (10L176w) :wink: Now Terminal > swift-v shows 4.2 and xxxx.swift files run with ML code!!! (from the WWDC video)

@dbourne Swift 4.2 works by default in Xcode 10 beta 2.

Hi shogunkaramazov

It wasn’t on by default when I installed Xcode but found that if I went to Preferences : Locations and selected it as the CommandLine Tools version it was available.

Thanks.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!