iOS 9 SDK Development now available

New book alert: iOS 9 SDK Development, now available as a beta ebook from Pragmatic Programmers.

Cover of iOS 9 SDK Development

So what’s new and different? Well, the big one is, it hasn’t been three years since the previous edition. In the history of the basic iOS book from Pragmatic Programmers, between me, Bill, and Janie, it’s previously been the case that we’d more or less completely rewrite the whole thing, then not do anything with the title for two or three years. And at that point, we’d find it was so out of date, we either had to do a ground-up rewrite, or pull it out of print. Not to mention that the sales in years 2 and 3 were pretty much zero; nobody wants an iOS 6 book once iOS 7 comes out.

So, new idea: instead of rewriting 100% of the book every three years, how about we rewrite 33% of the book every year? Could that be a sustainable pace? That’s what we set out to try with this edition.

Well, “we” is a bit strong. Bill is long lost to the Apple hive-mind, and Janie wildly overcommitted herself to a Summer/Fall speaking schedule that included CocoaConf, 360iDev, 360iDev min, and CocoaLove. I think she’s actually speaking at more developer conferences this year than I am (although I do have her beat 3-0 for speaking dates at anime conventions). So except for a few little bits she was able to contribute here and there, this one is mostly on me.

What’s new this year is a full, deep commitment to Swift. Last year, Swift was a surprise, and we updated the book for Swift, but still thought of it mostly as “a frameworks book”. Stalling for time has served us well, as I ended up getting a full-time Swift position at Rev (yes, MathElf is written entirely in Swift), and with the rigorous peer reviews there, I thought I was very ready to speak specifically to Swift and its strengths. Looking back at our code from last year, I made fundamental changes to bring the book up to speed with contemporary Swift conventions. For example, in the previous edition, the model code for our tweet-parsing is all classes, even though those classes were little more than containers for properties. Now those are structs, with functionality added via extensions as needed. And I’ve removed a lot of distasteful force-unwrapping… maybe not every ! in the book, but most of them.

The first three chapters are now a Swift deep dive, taught entirely with playgrounds. Chapter 1 goes immediately from foo = bar to a five-line web-radio player, and then in chapter 2, we have distinct playgrounds for the various types (numeric, collections) and core concepts (control flow, etc.). In chapter 3, the focus is on “stylish” Swift: we start with the old-fashioned way to do things with classes, and then offer a more Swift-y alternative based on enums, structs, extensions and so on.

Five line web radio playground in Swift

Beyond the new Swift, the rest of the book takes on new topics opportunistically. The testing chapter adds iOS 9 user-interface testing (the worthy successor to the never-quite-right UI Automation), one of the sections in the navigation chapter introduces the stack view, and I’m pretty sure I can get 3D touch into the gestures chapter (that’s what I’m working on now).

12 of 17 chapters are in the can now. The goal is to wrap everything in the next 4-6 weeks, depending in part on how long it takes me to completely rewrite the publishing chapter (I really want to get TestFlight in here, since it works with the narrative of maintaining your app through testing, launch, and beyond).

And then after that, we’ll see if this “rewrite 1/3 of the book every year” approach works. I keep looking for a sample project idea that could replace the Twitter client we’ve used for the last few editions; while it’s not as fresh as it was when we first got a native Twitter API, it has the advantage of being very flexible, and letting us introduce new topics like navigation, gestures, and extensions pretty organically, since there’s always a new feature you can add to a Twitter app, right?

Check back next year to see how that works out.

Comments (2)

  1. Thank you for continually taking on the unenviable task of writing a book. I hope it works out even after calculating how much you made per hour.

    Will the new book get deep with the Protocol Oriented Programming everyone’s gushing about or is that still a little too new? Not that my purchasing the book hinges on that. The purchasing is already done.

  2. Willie Fatimehin

    You ever try considering an Instagram type app as a sample project idea. I am in the process of creating a app with a similar layout of instagram and think instagram has many of the necessary teaching components.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.