About This Edition

This is the fifth time Pragmatic Programmers has offered an introductory book for iOS developers. The previous entries were iPhone SDK Development in 2009 (covering iPhone OS 3), iOS SDK Development in 2012 (for iOS 6), iOS 8 SDK Development in 2014 (for iOS 8), and iOS 9 SDK Development in 2015 (for iOS 9).

As you might notice, we’ve gone from a sporadic update model to an annual one. This was motivated by Apple’s introduction of the Swift programming language alongside iOS 8. Swift is exciting and fun, and we love coding in it, but there is a cost to living on the bleeding edge. Apple has aggressively evolved the language over the last three years, to the point where our iOS 8 book code wouldn’t build in iOS 9, and the iOS 9 code is incompatible with iOS 10.

Since we can’t realistically rewrite the entire book every year—at least not if we want to get it out soon enough to be useful—we’ve chosen our battles. For the iOS 8 book, we mostly focused on the iOS frameworks, and treated Swift as a means to an end. For iOS 9, Swift had settled down and we could dedicate the first three chapters of the book to really getting into the language itself, before playing with the frameworks.

For this edition, with few major changes in the iOS frameworks themselves, we took the opportunity to rework the core of the book. Like a lot of programming books, we built this around example code we hope will be fun to work with. For the last few editions, we built up a Twitter app as our example. It was fun, but it had some drawbacks—readers had to have a Twitter account to run the example, the Twitter API wasn’t entirely analogous to client-server programming in general, and sometimes the example forced our hand in how we handled some topics.

So for this edition, we have a new sample project to work through: a podcast client app. This will give us a chance to touch on fun stuff like the media APIs—after all, Steve Jobs originally introduced the iPhone as “the best iPod we’ve ever made”—while using more generic networking APIs like URLSession and XMLParser. We think this will be more directly applicable to the apps you write after finishing the book.

Throughout the book, we have updated all the code to the new Swift 3, which significantly cleans up and simplifies much of the language. In particular, the C-like function calls we used to use for things like concurrency are largely a thing of the past—this year, the concurrency chapter (Chapter 7, Handling Asynchronicity with Closures) was a joy to write, because Dispatch.main.async(…) is a lot easier to remember and write than dispatch_async(dispatch_get_main_queue(), …).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset