Archives for : publishing

Announcing iOS 8 SDK Development

Not that I’ve been even remotely subtle about it, but with today’s release of iOS 8 and the end of the NDA on its SDK, I can now officially announce iOS 8 SDK Development, now available as a beta book from Pragmatic Programmers:

Here’s the tl;dr:

  • Pretty much completely rewritten from previous edition
  • All code examples use the Swift programming language
  • Works through a single app all the way through the book so readers get experience of evolving a non-trivial app
  • Shows off iOS 8 features, including adaptive sizing strategies for the iPhone 6 and iPhone 6 Plus

Continue Reading >>

Asynchronous Unit Testing in Swift: The Good, Ugly The Bad, And The

Janie Clayton-Hasz and I are working on the unit testing chapter for the still-unannounced book, and we’ve had enough fun that we decided to share a little bit of what we’re up to.

In the previous edition, I wrote a testing chapter based on Bill’s iCloud recipes project, and it was a nightmare for a couple of reasons. First, a completion handler that was supposed to be called from -[UIDocument closeWithCompletionHandler:] wasn’t, at least not in iOS 6. Second, iCloud sucks (c.f., “First”). And finally, the whole idea of testing something that takes an unknown amount of time is an interesting problem, one that OCUnit was not built to handle.

So it was really cool that Janie did the research and came back with promising results about asynchronous unit testing in iOS 8 / Xcode 6. Then we jumped into the chapter and… well, it’s not as pretty as the WWDC video would have you believe. It works, but sometimes you have to play a little dirty to get it there.

Continue Reading >>

Dub Dub Disclosure Conference

Interesting development coming out of WWDC this year. When we all logged into the dev center to get the new iOS 8 / Mac OS X 10.10 / Xcode 6 bits, there was a new developer agreement to acknowledge. One of the few people to actually read it, Ole Begemann, noticed that it has a surprising new provision:

Further, Apple agrees that You will not be bound by the foregoing confidentiality terms with regard to technical information about pre-release Apple Software and services disclosed by Apple at WWDC (Apple’s Worldwide Developers Conference), except that You may not post screen shots, write public reviews or redistribute any pre-release Apple Software or services

In the past, all of us developers have had to tip-toe around the new SDKs, APIs, and tools until they’re officially released, which leads to embarrassing situations like WWDC recap sessions at CocoaHeads where we say “well, if they were going to put an Obj-C wrapper around Core Audio, they might…”. This new change in policy would seem to indicate that we’re no longer compelled to engage in such silly antics.

Fry: Not sure if NDA is still on, or if I just broke it

Continue Reading >>

ARC-ing Learning Core Audio

Pearson has just posted an update to the Learning Core Audio sample code, available from the book’s home page (look under the “Downloads” tab).

Basically, this update is all about making it easier to work with the download zip. Specifically:

  • All projects now use “Latest” (OS X | iOS) as their Base SDK: We had been specifying old SDKs that are no longer included in Xcode 5.1, so some readers got hung up on what they needed to do to resolve the “Missing Base SDK” message.

  • All Foundation projects now use Automatic Reference Counting (ARC): Not as big a deal in our book as you might think, because the middle half the book is all Core Foundation and doesn’t even need ARC, but we had some readers insist the book was broken because they got build errors on [foo release] and didn’t know what to do (either remove the manual memory-management lines or just turn off ARC). This has the unfortunate effect of making the download code no longer match the book text, and adding some nuisance __bridge casts, but ARC is so entrenched at this point, it’s for the best.

  • Each project now has a README.txt file If individual examples have to get updated in the future, we can log those changes here.

  • Re-colored the “piano key” buttons in CH11_MIDIWifiSource Because iOS 7 made them look like poorly-colored labels

There are no errata fixes in this go-round, nor any content changes. It’s just about making the download more useful. Might be the last time we need to update it? We’ll see.

Correcting Core Audio

A client unexpectedly hitting pause on a major project has me less employed than I’d like right now — yes, I’m available, ping me — so I’ve spent some time in the past few weeks cleaning up some corrections on Core Audio stuff here and there.

I went through the e-mailed errata I’ve received for Learning Core Audio and sent off an update to Pearson, although it’s not yet up on the book’s home page. The biggest fix here is a typo in the chapter 8 audio pass-through for Mac, which sometimes causes bad distortion depending on your selected input device. The bug was caused by mis-counted timestamps and apparently a race condition of which audio unit (input or output) got called first… all owing to the fact that I had set -1 as a flag value, and then did a comparison against 0 instead of -1. Anyways, if this is something that bit you, watch the book’s home page for an update, or just grab the updated code from my Dropbox. The zip has a CHANGES.txt with the other code fixes in this update.

The other thing I had to correct was my ambitious pitch-shifting web radio demo that I developed for my CocoaConf Portland talk. The effect stopped working in iOS 6.1, and fixing it led to a long engagement with the coreaudio-api mailing list and the use of an ADC support incident on my part.

Continue Reading >>

Deal of the Day

InformIT has the eBook of Learning Core Audio for just $9.99 US, today only (October 18, 2012), as their eBook Deal of the Day.

Book updates: iOS 6 and Friends edition

A couple of important updates on my last two books:

iOS SDK Development

We just pushed an update to iOS SDK Development that updates the book to iOS 6. The biggest change, of course, was the iPhone 5, which required us to rebuild every damn project in the book with Auto Layout so it works well at both screen sizes, 3.5″ and 4″.

While iOS 6 doesn’t have the kinds of massive changes that led us to rewrite the whole book in the first place — blocks, Xcode 4, ARC — we’ve made sure we have adopted new stuff wherever possible, like the new Obj-C literals for strings and dictionaries, and the Social framework that supplants the Twitter framework and adds support for Facebook and potentially other social networks in the future.

Alas, iOS 6 seems to have a grievous -[UIDocument closeWithCompletionHandler:] bug that makes my unit testing example totally suck: instead of being able to perform the test once the completion handler signals that the document has been saved, we have to just wait 30 seconds to be sure UIDocument has done its thing. This is a regression from iOS 5. Link above goes to the Open Radar copy of the bug I filed with Apple.

Continue Reading >>

Article: A Tour of the iOS Media Frameworks

Pearson asked for an article they could post on InformIT during WWDC week, to promote the Learning Core Audio book (buy it from the publisher, Amazon, iBooks, whatever), and I felt a useful Core Audio article would easily blow past their 1,500-2,000 word guideline.

So instead, A Tour of the iOS Media Frameworks offers a high-level view of the different ways to play, record, and manipulate media on iOS, with a particular focus on determining which framework suits a particular purpose. So, hopefully, it’s approachable for all readers, and will guide you to where you might want to dig in further.

iDeveloper Live, Minus the Live

I was a guest on last week’s iDeveloper Live, which gave me a chance to talk to Scotty and John for over an hour about the Learning Core Audio book, Core Audio and other Mac/iOS media frameworks, the iOS SDK Development book, and why I decided to take a pass on WWDC this year (mostly for the reasons I discussed last year). Also, for whatever reason, we spent an inordinate amount of time up front on the fact that I live in Grand Rapids and why that is awesome.

Anyways, if you’re not already subscribed to the show’s post-facto podcast in iTunes, you can grab the episode from its show notes page.

UPDATE: The other thing I wanted to mention in this blog (and forgot to) is the response to the Learning Core Audio book in the first few weeks since its introduction. Overall, the feedback has been better than expected, as have the sales (I expected practically no sales, because of how poorly my QuickTime for Java book sold). We’re still holding onto a top-30 ranking among Mac programming books on Amazon, where the Kindle edition has been sporadically outselling the paper edition, much to my surprise.

The one rub for me is an inexplicable one-star review on iBooks that takes us to task for not covering creation of a custom audio unit, something we left out in part because it’s one of the few Core Audio topics for which Apple has a full-on tutorial. To be bashed for that, and then accused of covering only “entry level” material that’s “easily found on the web” (despite the long-standing complaint that Core Audio has little to no usable documentation), is just mind-boggling. I know, creators shouldn’t complain about reviews, but this one is so detached from reality, it makes me wonder where I’ve spent the last two years, and if I’ve maybe slipped into a parallel reality where we did a crap job and performed no original research or experimentation. Fortunately, the rest of the feedback we’re getting is a lot more positive.

Mid-April progress update

OK, grab bag of stuff:

Author copies of Learning Core Audio

Amazon freaked out people who’d pre-ordered Learning Core Audio by sending, on the book’s release April 9 release date, a “yeah, it’s gonna be another three months” e-mail. Gee, thanks guys. Publisher assures me that thousands of copies have been printed and many of them are in transit to Amazon, or may be there by the time you read this. Amazon’s listing now says it ships on Saturday.

Collecting my kickback-powered affil links from previous posts:

Availability of eBooks outside the US is spotty: iBooks is US and Canada, Kindle is US and UK, etc… Apparently, we’re waiting on contracts with various vendors in various countries. Elsewhere, I think you can just get the ePub+PDF bundle from the publisher, and one or both of those formats should work on the reader of your choice (plus, InformIT’s eBooks have no DRM, just watermarking, so you can be publicly shamed if you seed a torrent of it. And don’t think I won’t.)

Also, if you’ve read the eBook via Kindle, iBooks, or via the Rough Cut on Safari Books Online, Kevin and I would really appreciate it if you could assign some stars and/or write a review on Amazon or iBooks. Empty review sections look lonely. Honestly, I’d rather have a bad review than none at all; indifference is a killer.

On my other book, we’ve just pushed beta 4 of iOS SDK Development, which includes my final chapter, covering “grown up” techniques like source control, submitting to the app store, and working with .crash reports from iTunes Connect. Now we’re off to tech review, print to follow.

I feel like Bill and I have accomplished what we wanted to with this book — instead of a “grand tour” of every API that tickled our fancy, we focused on a solid grounding in the new tools and techniques (Xcode 4, blocks), and best practices (unit testing, multi-core awareness). I think that’s also going to be a little more future-proof than the first edition, which got increasingly out of date as Apple bulked up the iOS SDK.

I do hope that Apple gets /usr/bin/xcodebuild test target-name working before we ship the paper book. I’d like to send this off with a solid automated testing story.

Finally, I’m going to be speaking again, at CocoaConf DC, in Herndon, VA, on June 28-30. This time around, my talks include the iOS 5 Core Audio talk I’ve done a few times now, another round of the Reverse Q&A that went over so well in Chicago, and a new talk on HTTP Live Streaming. HLS is something I’ve shoehorned into many of my AV Foundation talks, and it’s time I just build a whole one-hour talk around it with demos and code.

Early Bird registration for CocoaConf is up now, ends April 27. Hope to see you there.

And if not there, well, I’m also talking with them about possibly doing an all-day Core Audio tutorial at a future CocoaConf. This comes from a couple tweets I sent out mentioning the habit of these smaller iOS/Mac conferences to start out with an all-day tutorial for beginners, and wondering whether there’d be an audience for a full day of advanced material. Given the interest in the Learning Core Audio book and the fact that most advanced developers haven’t touched Core Audio — legendary for being crazy hard and all — it struck me as an interesting option for an experiment. Is there potentially a room-ful of people that would travel to a conference to get a one-day deep-dive introduction to a hard topic like Core Audio? Seems worth trying and finding out. Actually, if you know you’d be interested in this, please post a comment. Thanks.