Alexis Taugeron

Spring Animations With SpriteKit

I really like how simple it is to make bouncy animations with UIKit since the addition of UIView’s animateWithDuration:delay:options:usingSpringWithDamping:initialSpringVelocity: in iOS 7. I looked for something similar in SpriteKit but couldn’t find anything.

You could concatenate a few actions with the right duration and timingMode (or timingFunction since iOS 8), but it’s very unconvenient and hard to get good results this way. My understanding is that Apple wants you to use SKAction’s customActionWithDuration:actionBlock: for such cases, but you still have to do the maths in your action block…

I hope something easier to use will be added to SpriteKit in a future release, but in the meantime I made a small set of extensions for SKAction that implement spring animations.

The code is available on GitHub, feel free to use it:

App Store Receipt Validation on iOS 7

In October 2010, Apple introduced the Mac App Store, and with it a unified receipt stored in the application bundle. Three years later, iOS gets the same treatment with the release of iOS 7.

Unfortunately, validating and parsing the receipt on the device in neither easy, nor well documented. As I discussed this subject on the Apple developer forums, I saw many developers getting stuck at various stages of the process, and some throwing the towel in.

This article contains a few gotchas I had while implementing receipt validation in Tap Tap Chinese. I hope it will save some time (and hair) to my fellow developers.

Streaming MP4 Videos + SRT Subtitles With Airplay

A few months ago, while working on a video playback iOS app, I encountered an interesting problem. My data was a bunch of video files along with their English subtitles, stored on a web server. I wanted to be able to stream these videos with the subtitles to an iOS device as well as an Apple TV.

Streaming a video from a remote file is a piece of cake thanks to MPMoviePlayerController. But adding the subtitles turned out to be much more difficult than I expected. Having them play on the device was already a bit involved, but being able to stream them from the device to an Apple TV literally turned into an epic battle.

I thought that would make an interesting topic for my blog. In this article, I explain how I approached this problem, what solution I came up with, and what parts of the problem remain unsolved. Oh, and I even share some code ;-)


Offscreen: An Amazing Reading Experience

The sun has set now. The clock in the top right corner of my screen is showing 22:59, and I’ve been head down in some UX work for too many hours today. It’s now time for me to turn off the devices. I take a couple of minutes to put my stuff in order and write down my priorities for tomorrow in a Moleskine, then head to the bedroom.

I’m now comfortably seated in my bed and it’s reading time. I’m excited. The reason: a newcomer on my nightstand that’s been occupying the last hour of my days for about a week now. No, it’s not the last tome of Game of Thrones. Nor is it the last Tim Ferriss 4-Hour-something best-seller. It’s just a magazine. A simple magazine I came across on a blog a few weeks ago, and decided to order to check it out.

Between Stimulus and Response

I recently finished the book The 7 Habits of Highly Effective People , by Stephen R. Covey. If you’re interested in improving yourself and didn’t get to read this classic yet, I strongly recommend it. I didn’t find everything useful in the book, but I love the framework it provides. It’s both conceptually meaningful and practically actionable. It has helped me improve several aspects of my life. I won’t spoil you the whole book and tell you what the 7 Habits are, but I want to share with you one idea I loved in the first chapter.