O'Reilly logo

Swift 2 By Example by Giordano Scalzo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

One skeleton server for two OSes

Before implementing the server, we need to prepare a build environment for both OS X and Linux; also, let's prepare a HelloWorld server, which handles a GET and POST request in a predefined URL.

An OS X skeleton server

The Swift open source version for OS X can be downloaded from https://swift.org/download/#latest-development-snapshots; however, because a new version is released every week, it could be too complicated to be aligned with the version.

Preparing the OS X environment

Fortunately, taking inspiration from projects in different languages, such as PyEnv for Python, Kyle Fuller released a useful version manager for Swift called Swift Version Manager, which can install and manage different versions of Swift ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required