Rss

Entropy

Confession: I have no idea whether the code examples from Learning Core Audio work on El Capitan and iOS 9. Maybe? Probably most of them? But I’m in a really conflicted state with where that book is.

The book came out in early 2012, which now makes it about four years old. It took about two years off and on to write, 2010 and 2011, with a big push to wrap it up at the end of 2011 because our editor was leaving Pearson to go to Apple. Looking at my mail history, I was approached about replacing Mike Lee on the book in late 2009, so the small amount of material that he and Kevin Avila wrote probably dates back to earlier in that year.

The point of this all being, the book is old now. The stated system requirements are Xcode 4.2, Lion (Mac OS X 10.7), and iOS 5. The examples in the first few chapters that use Foundation instead of Core Foundation actually use manual retain, release and the NSAutoreleasePool because the book largely pre-dates ARC (we did finally ARC-ify those examples in the April 2014 update to the downloadable sample code, at the cost of no longer matching the written material in the book).

So now what?

Continue Reading >>

#import [Time code];

Hey, look, I ported the blog to Swift! [Time code]; is now Time.code(), which means I’ve lost the warm hug of the Objective-C square braces, but at least I don’t need a semicolon at the end of every line either.

What’s really going on is that after freeloading off my friend Michael’s; web hosting account, I finally decided that I really ought to take hosting into my own hands. So, I’ve brought everything over to a t2.nano instance on AWS and hopefully haven’t lost too much in the move.

Continue Reading >>

Hey, Big Spender

“Oh hell, another App Store thinkpiece.” Yeah, I know, not really my department even, so I’ll try to through it quickly. I just can’t help but think about some ideas and facts that can’t all be true at the same time.

Let’s start with this: 5 of the last 6 Kickstarters I’ve supported (check out my profile there) have been for software projects, games specifically. None of them are for iOS, only one is for OS X, and collectively, they represent far more than all my purchases on the App Store combined over the last 7 years (and that’s coming from someone who dutifully plunked down $50 for OmniGraffle for iOS and buys the new $5 Pinball Arcade table I-AP every month).

Continue Reading >>

CocoaConf San Jose starts on Thursday. As with the other stops on the Fall tour, I’ll be doing an all-day class on App Extensions, and regular sessions on WatchKit media APIs and “Revenge of the 80s”, which is about old productivity APIs like cut/copy/paste that have been with us since the first Macs and which we take for granted.

This is also the last speaking I’ll be doing for a while. I’m taking at least the first half of 2016 off, maybe longer.

OK, sorry, didn’t mean to sound dramatic. But hey, you have to have a hook before the fold. Let me explain where my head’s at right now.

Continue Reading >>

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.

Continue Reading >>

Curse Your Sudden But Inevitable Betrayal

You guys, and girls, you won’t believe this.

So at work, I’m doing a feature that requires sharing a pre-formatted message by the user’s choice of mail, iMessage/SMS, Twitter, or Facebook. So we use the typical iOS compose controllers from the MessageUI framework for the first two, and Social framework for the others. Everything’s fine, until my issue gets returned, saying that the Facebook share sheet has no text.

It’s fine for me when I test it, so I search around for “SLComposeViewController Facebook empty” and discover something.

Continue Reading >>

Late 2015 Conferences Update

Quick note about speaking plans for late 2015:


CocoaConf

I’ll be speaking at CocoaConfs Boston (Sep. 18-9) and San Jose (Nov. 6-7). Boston is going to be a one-track conference, since CocoaConf had such good results with that in Yosemite. I’ll be bringing my App Extensions class and Video Killed the Rolex Star, which is all about the media APIs that are (and aren’t) on Apple Watch.

Chris Adamson in Game Show

Early Bird for Boston ends Friday (July 31), so get on it if you want to go.

Continue Reading >>

AV WWDC, part 2: Fair Is Pretty Foul

Next up on our tour of WWDC 2015 media sessions is the innocently-titled Content Protection for HTTP Live Streaming. Sounds harmless, but I think there’s reason for worry.

For content protections, HLS has always had a story: transport segments get a one-time AES encryption, and can be served from a dumb http server (at CocoaConf a few years back, I demo’ed serving HLS from Dropbox, before it was https:-always). You’re responsible for guarding the keys and delivering them only to authenticated users. AV Foundation can get the keys, decrypt the segments, and play them with no client-side effort beyond handling the authentication. It’s a neat system, because it’s easy to deploy on content delivery networks, as you’re largely just dropping off a bunch of flat files, and the part you protect on your own server is tiny.

So what’s “FairPlay Streaming”, then?

Continue Reading >>

AV WWDC, part 1: Hot Dog… The AVMovie

I attended WWDC for the first time since 2011, thanks largely to the fact that working for Rev means I need to go out to the office in San Francisco every 6 weeks anyways, so why not make it that week and put my name in the ticket lottery. I probably won’t make a habit of returning to WWDC, and the short supply of tickets makes that a given anyways, but it was nice to be back just this once.

Being there for work, my first priority was making use of unique-to-attendee resources, like the one-on-one UI design reviews and the developers in the labs. The latter can be hit-or-miss based on your problem… we didn’t get any silver bullet for our graphics code, but scored a crucial answer in Core Audio. We’ve found we have to fall back to the software encoder because the hardware encoder (kAppleHardwareAudioCodecManufacturer) would cause ExtAudioFileWrite() to sometimes fail with OSStatus -66570 (kExtAudioFileError_AsyncWriteBufferOverflow). So I asked about that and was told “oh yeah, we don’t support hardware encoding anymore… the new devices don’t need it and the property is just ignored”. I Slacked this to my boss and his reaction was “would be nice if that were in the documentation!” True enough, but at least that’s one wall we can stop banging our head against.

Speaking of media, now that everyone’s had their fill of “Crusty” and the Protocol-Oriented Programming session, I’m going to post a few blogs about media-related sessions.

Continue Reading >>

Apple TV… Buffering…

Forgive me a little Apple armchair-quarterbacking, but I’m still puzzling over the most under-reported story from this week’s Apple Event: the $30 price cut on Apple TV.

Is this the sound of capitulation?

Continue Reading >>