Impress at Job Interviews by Inspecting their App Bundle
Techniques Apple doesn’t want you to know
Subscribe to Jacob’s Tech Tavern for free to get ludicrously in-depth articles on iOS, Swift, tech, & indie projects in your inbox every two weeks.
Paid subscribers unlock Quick Hacks, my advanced tips series, and enjoy exclusive early access to my long-form articles.
While I always try to pass job interviews on merit, it’s always good to have a few aces up your sleeve.
If you know the secret languages of .ipa-ese & bundleglyphics, you might surprise and delight with unexpected architectural feedback — if you take 10 minutes to inspect and analyse their app bundle ahead of time.
Getting the app file
The first step to inspecting an app bundle is, naturally, obtaining a bundle you want to inspect. So hop to the App Store and download it directly to your device.
Apple intentionally makes it hard to look at the actual file on the device storage (because reasons).
So we need to be a little cleverer.
On your Mac, you need to download Apple Configurator. This is a first-party program by Apple designed to help administrate an iOS device fleet across a business or school.
It also has a handy secondary function: allowing us to directly access app files on an iPhone, from the Mac.
Connect your iPhone with a cable and make sure you see it appear in Apple Configurator.
Click on your device, tap “Add”, then “Apps”.
You should see a list of all the apps downloaded onto your device*. Now you simply locate the app you want.
*Some apps, such as banking apps, don’t actually show up in this list. They likely guard against being installed via this approach.
Search in Finder (or better yet, Terminal) for /Users/[your-username-here]/Library/Group\ Containers/K36BKF7T3D.group.com.apple.configurator
.
Now locate and open the Library/Caches/Assets/TemporaryItems
folder for the Configurator application container.
In Apple Configurator, with an app selected, you can hit the “Add” button to download it to your Mac.
The .ipa
file will appear in the TemporaryItems/MobileApps
folder (briefly!) — copy it to your main file system so we can start playing with it.
Inspecting the .ipa
Even though we now have the .ipa
file, it’s not obvious how to access it.
There’s a special trick we can perform to look inside. We just need to understand what an .ipa
actually is: it’s the compressed form of an app, which is transmitted to us over the app store when we download it.
When downloaded, your iDevice uncompresses it into an .app
file.
The trick? Just add a .zip
extension to the end of the .ipa
file, so the file becomes .ipa.zip
.
The icon changes and we can simply double-click it to trick the .ipa
file into uncompressing as a regular file-system folder.
Now we can take a look inside the app.
An .ipa
file contains some metadata alongside the .app
bundle in the Payload/
subfolder.
This is a little easier to inspect: we can right-click and select Show Package Contents.
Finally, we can see the files that make up the app we’re looking at.
It’s tougher to look inside the assets bundle (.car
file). Another app, AssetCatalogTinkerer, uses a private CoreImage API to do just that.
Emerge Tools
If you want to go a little deeper, look no further than my friends at Emerge Tools.
With a free trial account, you can upload the .ipa
file straight to their systems and see a comprehensive X-ray of the bundle, broken down into frameworks, modules, all the way down into files.
The secrets of iBeer revealed: we have…
Tiny foam bubble .png
s. Lots of tiny foam bubble .png
s.
It takes a while to learn to read these X-rays, but you can learn a lot about an app by inspecting them.
For example, you can determine:
Whether there are accidentally massive asset files (like 10MB+ images).
Where a module is duplicated across multiple targets.
If binary symbols or other metadata are causing bloat.
You can even look at the app over time to pinpoint where a significant architectural migration might be happening.
More importantly, once you’re an expert, few things sound better in a job interview than saying something like “I looked at your app bundle, and noticed your NetworkCore module was duplicated — you imported the static library into both the main app & notification share extension. You could re-package the module as a dynamic framework and save 14MB of space.”
But, then again, nobody likes a smart-arse.
Conclusion
If you like this post, please do tell me, because I could probably do a whole series on analysing app bundles and subsequent optimisation.
If you can’t wait, please check out my recent collaboration with Emerge Tools, Make Your iOS App Smaller with Dynamic Frameworks, where I explain how you can create dynamic frameworks with Swift Package Manager and demonstrate a novel technique to handle shared asset catalogues.
Special thanks to Alexey Alter-Pesotskiy, curator of the Mobile Automation Newsletter, who wrote the original article on how to download .ipa
files, from which this article took heavy inspiration.
Thanks for writing this very interesting and helpful. I’m looking forward to diving into one of my own apps which was made in Unity before I learned swift.
Very neat! I’ll keep these tips in my back pocket for any future interviews.