Build: iOS 10 SDK Development, Chapter 8 (part 3)

And now for the weird part. We have an XMLParser that can parse the top-level parts of a podcast feed. But to parse the episodes, we have to create a second parser delegate, one that knows about episodes rather than feeds, and repoint the XMLParser to send its events to the other delegate, then pass it back when it reaches the end of each episode. Sounds weird, and it made a lot more sense in Objective-C than in Swift, but it actually works! And with this, we complete our introduction to XML parsing.

Interstitial

Play: Poker Night 2

Telltale’s Poker Night series brings together a witty group of characters from animation, comics, games, and film, to play cards and make crazy jokes about their various fictional universes. In Poker Night 2, we get to play Texas Hold ‘Em with Brock from The Venture Bros, Claptap from Borderlands, Ash from the Evil Dead series, and Sam from the Sam & Max comics. All with GLaDOS from Portal as the sarcastic dealer. Jokes are courtesy Mike Stemmle (“Strong Bad’s Game for Cool Game for Attractive People”, “Tales of Monkey Island”), and they’re funny.

Read: Muv-Luv Alternative, Episode 3, Part 2

The cadets continue their slog through the Comprehensive Combat Skills Evaluation, their make-or-break test to allow them to begin TSF pilot training. Being on his second trip through this timeline, Takeru knows how it’ll end, but he also knows he’s up against a deadline to prevent Alternative V, so he needs to push history along faster than it went last time. How much of his foreknowledge can he afford to use?

Build: iOS 10 SDK Development, Chapter 8 (part 2)

And now, the hard part: XML Parsing. The XMLParser API provided by the iOS SDK is an event-driven parser, and not particularly pleasant to work with, so we roll up our sleeves and dig in. We make our own parser class implement the XMLParserDelegate class, so it can be called back when the XMLParser starts and ends tags, finds text, and so on. By selectively handling these callbacks, we can parse the feed’s top-level metadata into a Swift struct.

Interstitial

Play: The World Ends With You: Solo Remix

A nice change of pace from the well-trod Final Fantasy series, The World Ends With You is an action-RPG with a distinct, modern aesthetic, set in Tokyo’s busy Shibuya district. Originally created for the Nintendo DS and heavily relying on that system’s dual screens, it was reimagined for mobile as “The World Ends With You -Solo Remix-“. It’s also infamous for having a crash-at-launch bug after an iOS system update that went unfixed for years, and even now has a warning that it’s not compatible with iPhone 7 or the iPad Pro (presumably meaning the 12”).

Read: Muv-Luv Alternative, Episode 3, Part 1

Chapter 2 ends with Takeru proving his foreknowledge of the future by telling Yuuko about the BETA incursion from Sadogoshima. He thinks it’s a chance to save hundreds of lives by preparing for the attack, but she has other ideas. Then, chapter 3 begins with another do-over from the previous timeline: the Comprehensive Combat Skills Evaluation. Takeru knows not to fall for the traps or get bitten by the snake this time; maybe he can speed up history?

Build: iOS 10 SDK Development, Chapter 8 (part 1)

Turning our attention from the player scene to the rest of the podcast app, we look at how we are going to download podcast feeds from the internet. After all, fetching stuff from the internet and putting it in a UI is most of what many apps do. To get started, we’ll use a URLSession to download a podcast feed’s RSS, and log it to the console. This will let us look at what’s in the feed, so we can set up some structs to model podcast feeds and episodes.

Interstitial

Play: Matt Duchene’s Hockey Classic

It’s Hockey Night in Wherever, and we celebrate by checking out the best hockey game for iOS. Granted, given the state of sports games on the platform (or paid apps in general) that is very faint praise, but nevertheless, Matt Duchene’s Hockey Classic plays as a perfectly typical console-style hockey game, albeit from two console generations ago, and without the NHL or NHLPA license.

Read: Muv-Luv Alternative, Episode 2, Part 2

Mikoto is back, and Takeru meets her for the second time, the first being the timeline of Muv-Luv Unlimited (and it’s the third time if we count that Takeru was a boy in Muv-Luv Extra). Her returns helps enliven and lighten the mood of the squad, and distract somewhat from Takeru’s repeated mistake of letting on more than he should about his foreknowledge of future events.

The plan was to do an invalidstream episode tonight. Unfortunately, I picked up a cold while I was in California, I’m still not over it, and there’s no way I can speak for 90 minutes straight with my throat this hacked up.

That said, I don’t want to just cancel either, since there definitely won’t be an episode next week (Friday, October 27), since I’ll be out at the Swift By Northwest conference (which you can still get tickets for, hint hint).

I think what I’m going to try to do is to do the stream Sunday or Monday night, as soon as I’m feeling better. Watch this space, or the @invalidstream Twitter account, for an announcement and preview video.

Build: iOS 10 SDK Development, Chapter 7 (part 2)

Using closures (and a convenient method provided by AVPlayer) lets us update the time display of our podcast player, but all is not well. When it comes to closures, memory management and queueing present subtle issues that will become subtle bugs if we’re not careful. In this episode, we see how weak references keep us from leaking memory, and how we keep our UI work on the one “main” queue where it’s allowed.

Interstitial

Play: Skullgirls

Originally a console release in 2012, Skullgirls came to mobile in 2017, and it may be the least likely fighting game you’ve ever seen. The game has a Roaring 20’s jazz age aesthetic that’s more Ub Iwerks than Akira Toriyama. It has an RPG-like story mode where you level up and buy your moves and abilities. And it ditches the simulated D-pad + 4 button approach in favor of one-hand touch-and-swipe input. Grab your flapper dress and a chainsaw; it’s showtime.

Read: Muv-Luv Alternative, Episode 2, Part 1

Takeru heads out to the shooting range with the rest of the class, where he continues to impress with his military skills accumulated from previously experiencing these events on a different timeline. He’s also becoming keenly aware that he’s pushing his luck with his “special” status. Fortunately, he may be able to take his Awesome McAwesomepants act down a peg when an old friend reappears.