Chapter    1

Hello World

I will start our conversation about Swift with the venerable Hello World program. However, you need to get some things in place before I can do that. Most importantly, you need a Mac app that will help you write and test Swift code. This Mac app is called Xcode.

Xcode

Xcode is a free app that you can download from the Apple App Store. Xcode gives you all the tools that you need to build applications for the Mac and iOS devices. These tools include a code editor, debugging tools, and everything else you need to turn your Swift code into an app.

Note  Xcode requires a Mac with OS X 10.9.3 or OS X 10.10. You cannot install Xcode on a Windows- or Linux-based computer.

Install Xcode

To install Xcode, go to the Mac App Store ...

Get Swift Quick Syntax Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.