Recently (17th May 2012) Hungry Jacks released an iPhone app called ‘Hungry Jack’s Makes It Better.’ The idea is simple, and a good one - use the app to drive customers to the stores via free products, and engage social media for advertising. The rules are as follows:
So, sounds like fun, hey? We like winning free burgers as much as our friends, and it wasn’t long before they (and others) started asking the obvious question - can it be faked? The answer is yes, read on to find out how :)
The first step on the journey is try it out. So off to Hungry Jacks to try our luck for a free treat. Now, some might say that you could use a location spoofing app to trick the iPhone into thinking it’s near a hungry jacks store, but that requires jail-breaking, so forget that for the minute. So, after a quick Facebook login, a shake of the phone reveals…..
That was easy. What happens if we are really hungry and want two cheeseburgers? The app wont allow another checkin until 10 hours has passed. Winding the clock forward in settings doesn’t change that either, so presumably your prize has been logged to a server somewhere against your Facebook ID (or maybe even device UDID?). But what was that famous Apple advertising campaign, ‘There’s an app for that,’ yeah we think there needs to be an app for this. An app that allows FREE Cheeseburgers, all day long. Of course, the friendly staff at Hungry Jacks may start to recognize you, but we decided it was an experiment worthy of our time.
So the next step was to pry open the app and look inside. This is well documented on the net, but steps involve:
The extracted files do not include the source code - only the compiled binary. Other files of note, however, are the font files, the intro movie (hj_intro.mp4), plenty of font files, some nib files, and plenty of images. The jpegs can be viewed, but none of the png’s can be, because they have been compressed by pngcrush. Time to reverse that action!
To uncompress a png from an iPhone archive, first you need to locate pngcrush. The standard versions of pngcrush don’t include the option we need, so you must use the one that comes with XCode. Use it like this:
$ pngcrush -revert-iphone-optimizations inputfile.png outputfile.png
There were many png’s in the archive, so a little bash looping magic will be required to uncrush them all.
So the next step is piecing it back together - building an app from the newly uncrushed assets. Using the above screenshots as references, interface builder was the obvious choice for laying out all the graphical elements. Thankfully the developers named the assets (relatively) consistently which made it pretty straightforward to piece together a puzzle that looked virtually identical. Now, for some fun, alternative prizes can be inserted in situ - oh the possibilities :)
Well, we think a submission to the App Store is in order, of course removing any litigating aspects first. Any advice, comments, suggestions, feedback, etc are more than welcome.