Pages: [1]   Go Down
  Print  
Author Topic: Apple's Autoscanning iTunes Card Promo Codes Work via Hidden Font, Can be Replicated by Devs  (Read 432 times)
HCK
Global Moderator
Hero Member
*****
Posts: 79425



« on: July 19, 2017, 04:05:08 pm »

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.





<img src="" alt="" width="800" height="534" class="aligncenter size-full wp-image-575947" />


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 voilĂ  - 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.





<img src="" alt="" width="800" height="510" class="aligncenter size-full wp-image-575948" />


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.

<div class="linkback">Tags: App Store, iTunes </div>
Discuss this article in our forums

<div class="feedflare">
<img src="[url]http://feeds.feedburner.com/~ff/MacRumors-Front?d=yIl2AUoC8zA" border="0"></img>[/url] <img src="[url]http://feeds.feedburner.com/~ff/MacRumors-Front?d=6W8y8wAjSf4" border="0"></img>[/url] <img src="[url]http://feeds.feedburner.com/~ff/MacRumors-Front?d=qj6IDK7rITs" border="0"></img>[/url]
</div><img src="http://feeds.feedburner.com/~r/MacRumors-Front/~4/NXT-7FsX4F0" height="1" width="1" alt=""/>

Source: Apple's Autoscanning iTunes Card Promo Codes Work via Hidden Font, Can be Replicated by Devs
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: