Appendix A. Objective-C

Note

The material in this appendix is not required learning. However, since Swift is a new language, you are likely to see Objective-C code when building iOS Apps. This chapter provides some guidance on how to interact with Objective-C code.

In this appendix, you will learn about Objective-C. You will learn why should you know Objective-C and how to read Objective-C. These skills will prepare you for working with older code and guides.

Why Objective-C Still Matters

This book has taught you how to successfully go from idea to App Store, using Apple’s newest programming language, Swift. Before Swift, Apple only had one official programming language, Objective-C. The Objective-C language was created by a team of software engineers at NEXT, a software and hardware company created by Steve Jobs after he was excused from Apple in the 1980s. Fortunately, in the 1990s Apple acquired NEXT along with Objective-C. The Objective-C language has served as the primary programming language for over 20 years. This language has been used for iOS programming since the first iOS SDK was released in 2008.

The iOS Stack

When an application is developed, it does not send messages directly to the hardware. Instead, Apple provides a series of layers that work together to translate the message to the hardware (Figure A-1).

Layers
Figure A-1. Layers

The closest layer to the application is called

Get Introducing iOS 8 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.