Install Swift 3: macOS
To install Vapor, you just need to have Swift 3 installed.
Download
If you have Xcode, you'll already have Swift 2 installed. But you'll need to download Swift 3 to use Vapor.
Swift Version Manager
If you work on multiple Swift 3 projects, you may want to follow "Install Swift 3 (Swiftenv)" instead.
# Download
curl -O https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-osx.pkg
# Install
open swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-osx.pkg
Install
# Add to path
echo "export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:\"\${PATH}\"" >> ~/.bash_profile
# Reload path
source ~/.bash_profile
Xcode 8
You must have Xcode 8 installed and selected.
Download and open the Xcode 8 beta, then run the following code:
sudo xcode-select -s /Applications/Xcode-beta.app/
Verify
Check whether your installation worked. The output should contain 3.0-dev.
swift --version
# Apple Swift version 3.0-dev (LLVM b010debd0e, Clang 3e4d01d89b, Swift 7182c58cb2)
Updated less than a minute ago
