This Week's Sponsor:

Kolide

Ensure that if a device isn’t secure it can’t access your apps.  It’s Device Trust for Okta.


How App Store Gift Cards Work

Equinux, maker of VPN Tracker, Mail Designer Pro, and other products has a fascinating look at the tech behind App Store gift and promo code cards that can be scanned and redeemed with an iPhone or Mac’s camera. The company wanted to make scannable cards of its own to hand out at events, so they began investigating how the alphanumeric codes found on the back of the cards work. It turns out there’s quite a bit to it.

After poking around under the hood of iTunes, Equinux discovered that Apple uses a special font, a certain size rectangle surrounding the redemption code, and private framework to scan the codes:

When you look at some of the other folders inside iTunes, we found a tantalizing plugin called “CodeRedeemer.” It showed promise. But alas, no font files there either. The app binary does give a hint of where the heavy lifting is being done: “CoreRecognition.framework.”

Inside the CoreRecognition framework were two fonts, Scancardium and Spendcardium, which, along with the surrounding rectangle, are the keys to creating custom cards.

The entire story is an impressive bit of sleuthing and well worth a read. If you’re a developer and would like to make scannable codes of your own, Equinux’s post includes instructions for doing so, along with Sketch, Photoshop, FileMaker, and Mail Designer Pro templates.