1

What is the default Swift version for auto suggestion on Xcode version 9.0 beta?

Is it Swift 3 or Swift 4?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Bharath
  • 2,064
  • 1
  • 14
  • 39

2 Answers2

1

It is Swift 4. Apple always encourages to use the latest language and its features.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
  • Is there any property in XCode that we can check that says which version it is auto suggesting by default? – Bharath Sep 13 '17 at 06:31
  • If you are changing the [development language](https://stackoverflow.com/questions/41118912/use-legacy-swift-language-version-xcode-8-2), auto suggestions will change with it. – Tamás Sengel Sep 13 '17 at 06:33
1

for more reference you can get the document from apple

You can use Xcode 9 to build targets that are written in either Swift 4 or Swift 3.

When the Swift 4 compiler is working with Swift 3 code, it identifies its language version as 3.2. As a result, you can use conditional compilation blocks like #if swift(>=3.2) to write code that’s compatible with multiple versions of the Swift compiler.

Community
  • 1
  • 1
Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143