Introducing Swift

So what is Swift and why are we using it? In the previous chapter, we had a choice of using Swift or Objective-C for our project, and we chose Swift. There’s a story there, of course. Objective-C has been the primary language of iOS development since the iPhone’s debut in 2007, and goes way back from there: through Mac OS X’s Cocoa in the early 2000s, and the NeXTStep environment of the 1990s. It started as a means of adding object-oriented features to C, and while it was enhanced in many clever and compelling ways over the years, various C legacies held back efforts to make Objective-C faster, safer, and easier to program.

So, in June 2014, Apple surprised the developer community by announcing they had created a new language ...

Get iOS 8 SDK Development, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.