Version Compatibility
This book describes Swift 4.2, the default version of Swift that’s included in Xcode 10.0. You can use Xcode 10.0 to build targets that are written in either Swift 4 or Swift 3.
Note
When you use Xcode 9.2 to build Swift 3 code, most of the new Swift 4 functionality is available. That said, the following features are available only to Swift 4 code:
A target written in Swift 4 can depend on a target that’s written in Swift 3, and vice versa. This means, if you have a large project that’s divided into multiple frameworks, you can migrate your code from Swift 3 to Swift 4 one framework at a time.