When Apple introduced Swift at the Apple WWDC (Worldwide Developers Conference) in 2014, the audience, packed full of developers for the Apple platforms, was stunned and silent. Swift is the first truly new programming language to be introduced for the Mac development platform in its history; Objective-C, C++, and C were all existing languages. Swift was built from the ground up, by Apple and for Apple.

Apple described the new Swift language as “Objective-C without the C,” but that doesn’t really do it justice. Swift is more of a completely new programming language than simply Objective-C with the C heritage extracted.

In a bold step, Apple not only released Swift at WWDC, but also released an ebook called The Swift Programming Language through iBooks, and gave it away for free. This begs the question – why write, and charge for, a book on Swift when the creators of the language have produced the canonical guide and made it free to download.

This book is not meant to be a complete language guide. It is instead written as a relatively short translation guide, intended to help Objective-C developers take their existing knowledge and translate it to the new language in a short period of time.

Table of Contents

  1. Creating Swift Projects
  2. Playgrounds and the Swift REPL
  3. Language Basics
  4. Control Structures
  5. Optionals
  6. Functions
  7. Blocks and Closures
  8. Strings
  9. Classes
  10. Structures and Enumerations
  11. Memory Management
  12. Collections
  13. Protocols, Extensions and Generics
  14. There Isn’t a Word for That
  15. Interacting With Objective-C