Cloud9 may be for Swift development, but by default the Swift development environment is not installed. This is indicated by the following error when running a .swift file:

bash: line 1: ...: No such file or directory

To install Swift, enter the following commands at the bash prompt. If you don't see a bash prompt, open a New Terminal window.

sudo apt-get update
sudo apt-get -y install clang libicu-dev
mkdir ~/downloads
cd ~/downloads
mkdir ~/swift
tar xzf swift-4.2.1-RELEASE-ubuntu14.04.tar.gz -C ~/swift --strip-components 1
echo 'export PATH=~/swift/usr/bin:$PATH' >>~/.profile
cd ~/workspace
rm -r ~/downloads

Then add a new runner for Swift files with the following configuration. Save the new runner as

    "cmd" : ["swift", "$file", "$args"],
    "info" : "Running $file_name",
    "selector" : "source.swift"

See Also