I have Xcode 14.3 in my Mac and no any other version of Xcode. My iOS app deployment target was 16.2. But in build settings, I'm not able to see latest swift version, only 4 options 4, 4.2, 5 and unspecified
was there. Can you help me to figure out, why it has swift version upto 5 only and what is meant by unspecified
and how to add/select latest versions of swift in build settings.

- 760
- 1
- 7
- 21
1 Answers
The "Swift Language Version" Xcode build setting isn't responsible for choosing which Swift compiler version to use when building your project. Instead, this setting control which language version to use - these language versions are the ones that have breaking changes, but are still supported by the current compiler version. In Xcode 14.3, these are Swift 4, 4.2 and 5.
You do not need to worry about changing this build setting each time a new Swift compiler version is release. Whenever a new version of Swift is released, Xcode is also updated with it to contain and use the latest Swift toolchain. Alternatively, you can also download Swift toolchain versions yourself and use them from Xcode. See How can I choose Swift compiler version on how to do that.
The only time you might have to switch the "Swift Language Version" build setting is when a new major version with a breaking change is released (most probably Swift 6 will be the next such version) and you want to start using this new major version. Manually having to switch the language mode allows developers more time to migrate their codebase for the breaking changes, while being able to use the latest compiler toolchain.

- 51,403
- 9
- 85
- 116