Install Swift for macOS
Download and install the latest version of Xcode from the App Store.
To verify your Swift installation, open a Terminal, enter the ‘swift’ command and pass the ‘--version’ flag:
You should see something similar like this:
Apple Swift version x.x.x (LLVM ..., Clang ..., Swift ...)
If you see an error message, such as ‘swift: command not found’, you will need to install the Xcode Command Line Tools. Within the Terminal type:
Alternatively you can install Command Line Tools within Xcode:
- Open Xcode Preferences using the shortcut: ⌘ + ,
- Click on the Locations tab.
- From the Command Line Tools drop down menu ensure the latest version of Xcode is selected.
Hello World: Create a simple
Create a Server: Create a Kitura server with scaffolding for a full application.