Apple's Autoscanning iTunes Card Promo Codes Work via Hidden Font, Can be Replicated by Devs

When you purchase an iTunes gift card and redeem it in the App Store, the camera on your iPhone, iPad, or Mac can scan the code on the card to recognize it automatically, saving you the time of typing the numbers in manually.

Equinux, the company behind Mail Designer Pro 3, dug into how Apple's promo code engine works in an effort to make their own scannable cards, and the results are quite interesting. As it turns out, the scanning feature in the App Store is tuned to recognize two things: a unique, hidden font and the dimensions of the box around it.

itunescardpromocode
Equinux tried the box alone with a range of fonts like Courier and Monaco, and attempted to identify the unique characteristics of the font to find it, but were unsuccessful. Ultimately, the team realized the font that Apple's using is hidden deep within iTunes.

The breakthrough came when we noticed that when you scan a card with your iPhone, the app briefly displays a "scanned" overlay of the code. This means the font must be embedded in the app somewhere. We tried the same with iTunes on macOS. And voila - the iTunes on Mac behaves the same way.

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."

Hidden in the CoreRecognition.framework, there are two fonts: "Scancardium," for entering and recognizing codes, and "Spendcardium," which appears to be for obscuring credit card details as they're entered. The two fonts can be found by going to Finder on a Mac, clicking Go, choosing Go to Folder and pasting the following: /System/Library/PrivateFrameworks/CoreRecognition.framework/Resources/Fonts/

With a simple double click, the fonts can be installed on a Mac and can be used within different apps. While this is a neat breakdown for end users, it's of particular interest to developers because these fonts can be used to create custom App Store promo code cards that can be scanned in the same way as iTunes gift cards.

appstorepromocodecustom
Equinux outlines the exact font height to use and how to position it within the surrounding box to get Apple's engine to recognize it, details the company uncovered after investing a lot of time in tweaking fonts and the border of the required box.

Equinux even went one step further and created helpful Sketch and Photoshop templates that developers can use to create App Store promo code cards that can be automatically scanned using a device camera and recognized by the App Store.

Related Forum: Mac Apps

Top Rated Comments

linkmaster02 Avatar
89 months ago
Is it legal to use the font in your own promo materials?
Score: 10 Votes (Like | Disagree)
ckelley Avatar
89 months ago
Probably the same one that's used for scanning HomeKit keys as well, the font looks similar.
Score: 8 Votes (Like | Disagree)
cateye Avatar
89 months ago
There's nothing "secret" about using a font this way. There have been specialty fonts that make for easy and reliable optical character recognition (OCR) via "fuzzy" recognition (e.g. using a photograph) for years. Apple may have developed their own font for whatever reason, but there are literally dozens of speciality typefaces that allow for this. Barcodes work this way as well. Microsoft made a stink at one point how you could hold up a MS gift card in front of a Kinect and have it read similarly quickly. It's a bit of a parlor trick, but does save you from having to type in all those letters and numbers.
Score: 8 Votes (Like | Disagree)
Appurushido Avatar
89 months ago
Apple technology, not always the first, but they make sure they always try to make it the best!
Score: 5 Votes (Like | Disagree)
TechRemarker Avatar
89 months ago
Since one can only presume that font is licensed by Apple, not sure how developers would be able to use it legally unless Apple some day officially extends the feature to develops and open sources the font.
Score: 4 Votes (Like | Disagree)
justperry Avatar
89 months ago
PS: I'm almost certain it doesn't even scan the font but the barcode below it.
I just scanned a Homekit accessory code (It's similar), there wasn't any barcode under it so you are wrong.
Score: 3 Votes (Like | Disagree)

Popular Stories

maxresdefault

Apple Announces 'Let Loose' Event on May 7 Amid Rumors of New iPads

Tuesday April 23, 2024 7:11 am PDT by
Apple has announced it will be holding a special event on Tuesday, May 7 at 7 a.m. Pacific Time (10 a.m. Eastern Time), with a live stream to be available on Apple.com and on YouTube as usual. The event invitation has a tagline of "Let Loose" and shows an artistic render of an Apple Pencil, suggesting that iPads will be a focus of the event. Subscribe to the MacRumors YouTube channel for more ...
Apple Vision Pro Dual Loop Band Orange Feature 2

Apple Cuts Vision Pro Shipments as Demand Falls 'Sharply Beyond Expectations'

Tuesday April 23, 2024 9:44 am PDT by
Apple has dropped the number of Vision Pro units that it plans to ship in 2024, going from an expected 700 to 800k units to just 400k to 450k units, according to Apple analyst Ming-Chi Kuo. Orders have been scaled back before the Vision Pro has launched in markets outside of the United States, which Kuo says is a sign that demand in the U.S. has "fallen sharply beyond expectations." As a...
iOS 17 All New Features Thumb

iOS 17.5 Will Add These New Features to Your iPhone

Sunday April 21, 2024 3:00 am PDT by
The upcoming iOS 17.5 update for the iPhone includes only a few new user-facing features, but hidden code changes reveal some additional possibilities. Below, we have recapped everything new in the iOS 17.5 and iPadOS 17.5 beta so far. Web Distribution Starting with the second beta of iOS 17.5, eligible developers are able to distribute their iOS apps to iPhone users located in the EU...
iPad And Calculator App Feature

Apple Finally Plans to Release a Calculator App for iPad Later This Year

Tuesday April 23, 2024 9:08 am PDT by
Apple is finally planning a Calculator app for the iPad, over 14 years after launching the device, according to a source familiar with the matter. iPadOS 18 will include a built-in Calculator app for all iPad models that are compatible with the software update, which is expected to be unveiled during the opening keynote of Apple's annual developers conference WWDC on June 10. AppleInsider...
iPhone 15 Pro FineWoven

Apple Reportedly Stops Production of FineWoven Accessories

Sunday April 21, 2024 6:03 am PDT by
Apple has stopped production of FineWoven accessories, according to the Apple leaker and prototype collector known as "Kosutami." In a post on X (formerly Twitter), Kosutami explained that Apple has stopped production of FineWoven accessories due to its poor durability. The company may move to another non-leather material for its premium accessories in the future. Kosutami has revealed...