How to set Swift version 5 (for recent dev snapshots) in Xcode build settings?

It's a good observation. Xcode puts in reasonable guard rails so uses of the production compiler stay within expected operating parameters. It's something we can potentially look to being more capability inferred in Xcode based on the compiler used, rather than a hardwired set of valid language versions.

1 Like

Not sure if itβ€˜s even related, but in the meantime maybe this small tool can help? I have nit tried the latest snaprahots myself, but will probably do on friday.

No, not with the issue discussed in this thread, ie not being able to use swift version 5 (for recent snapshots) in Xcode 10.1.

The solution was presented by @tkremenek above.

1 Like

thanks, @tkremenek. I wrote a whole post about it here.
It seems you can use the Legacy Build System since that seems to ignore SWIFT_VERSION . Besides being Legacy what other issues could that raise? Is the New Build System in Xcode just more optimized?

SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2

This error occurs when you are using pod and frameworks.

if you observer build settings of each framework you will find one of the framework with "SWIFT Complier setting" swift 5(unsupported) , change it to lower version.
It should fix the issue.