上QQ阅读APP看书,第一时间看更新
Installing the Xcode IDE on your Mac
Download Xcode 10.1 or greater from Apple's Mac App Store:
After downloading, you must launch Xcode to continue the installation process. This may take a while.
Once Xcode is installed successfully on your macOS, you can verify the version of installed Swift by running the following command on the Terminal:
# Step 1a: Check Swift installation after have Xcode installed
$ swift --version
You should expect to see output similar to the following:
Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Target: x86_64-apple-darwin17.7.0
The code samples in this book require Swift 4.2.1 or greater installed on your macOS.