Preface
Aut lego vel scribo; doceo scrutorve sophian.
On June 2, 2014, Apple’s WWDC keynote address ended with a shocking announcement: “We have a new programming language.” This was surprising in several ways:
- Apple buried the lede (or, looking at it another way, they saved the biggest until last).
- Like the weather, everyone had long talked about the need for a new language to replace Objective-C, but no one believed Apple would ever actually do anything about it.
- How on earth had Apple done all the groundwork needed to design, prepare, and implement a whole new programming language without the least rumor leaking out?
Having picked themselves up off the floor, developers immediately began to examine this new language — Swift — studying it, critiquing it, and deciding whether to adopt it. My own first move was to translate all my existing iOS apps into Swift; this was enough to convince me that, for all its faults, Swift deserved to be adopted by new students of iOS programming, and that my books, therefore, should henceforth assume that readers are using Swift.
Therefore, Swift is the programming language used throughout this book. Nevertheless, the reader will also need some awareness of Objective-C (including C). There are two chief reasons for this:
- The Foundation and Cocoa APIs, the built-in commands with which your code must interact in order to make anything happen on an iOS device, are still written in C and Objective-C. In order to interact with them, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access