Friday, May 25, 2012

How Rogue Amoeba's Airfoil Speakers could get pulled from the App Store for using a non-private API

Apple says Rogue Amoeba's Airfoil Speakers was pulled from the App Store for using a private API.

To recap, using a private API is sure to get your app rejected from the App Store. Unless Rogue Amoeba open sources their app, no one knows for sure if they're using a private API. I believe them when they say they aren't using one. But there is another way to get in the situation they're in.

Let's say an app developer unknowingly uses an API that was previous not flagged as private. Perhaps it's a publicly "known" API, even an open secret, but technically not part of the public API set. Your app passes the automated private API check and gets through manual review. A little while later, Apple adds the previously not-private API you used to the catalog of private APIs. Perhaps Apple realized their oversight, and given how serious they are about apps not using this API, ran an automated check against all App Store apps for usage. They discovered that Airfoil Speakers used this private API. Clearly they choose to pull the app in this case.

I offer this possibility because something similar happened on a project I was working on. A number of versions of the app had been approved and where for sale on the App Store when a small bug fix release was stopped cold during App Store manual review for private API use. The team was mystified at first and insulted, we hadn't used any private APIs, and had barely changed the app, what gives? But we did use a private API without even knowing it. The app used MAZeroingWeakRef for weak pointers, almost exclusively for delegates, but also for KVO notifications. Turns out the version of MAZeroingWeakRef we were using was intercepting a private API call!
@interface NSObject (KVOPrivateMethod)
- (BOOL)_isKVOA;
In a later version of the library, there was a #define to not use that API. We turned it off, the app came crumbling down with memory issues. It was not a fun few days working to solve all the memory management issues MAZeroingWeakRef had hidden from view when there was a critical bug fix update to ship.

Tuesday, May 22, 2012

How Stephen King's "Under the Dome" Made Me A Reading Coward

Stephen King's "Under the Dome" was the first eBook (Kindle if you're keeping score) I ever bought. Reading it took me nearly as long as it took Mr. King to write it, close to 2 years, because I was a coward. Why? Because for most of this book, at least up to the halfway point, I had no idea how it was going to end. That's a good thing you say? I agree, which is why my reaction was so surprising. 

Warning: light spoilers

How does King pull off the "not sure who's going to make it" feeling? The cast of characters is huge, and they die all the time, even the ones that have got significant page time. It sort of feels like Game of Thrones in that regard. Maybe I wasn't being cynical enough, because once you make the halfway turn, the characters that seemed most likely to make it do. The character most likely to be the villain is in fact the villain, or at least the secondary villain. The cause of the dome, the main "villain", I can honestly say was one I didn't fully expect. Does this tie into the Dark Tower somehow? All the "19" references leads me to believe so, but not in any significant way that I can see.

But my cowardice in continue reading the story was shocking once I identified why I took such long breaks. I read other stuff in between, including King's hopefully not final Dark Tower book "The Wind Through the Keyhole" (loved it). I didn't have any issues finishing those stories. If dawned on me as I was finishing Under the Dome that I haven't been watching many movies & shows, playing many story driven games, or reading many books that don't have a long running story. I think this is what sequelitis must feel like, the damage never ending or long running stories do. Maybe it's just me, but it feels like I've been unconditioned from enjoying stories that actually end. Under the Dome was going to fast, the plot was to chaotic, is he going to explain the whole universe?

While I love stories connected to a larger universe (and any Dark Tower connection is tangential), sometimes you just need a story that's self contained, and which leaves a little to the imagination. Sometimes the best stories are the ones that end.