Measuring App Size
Intro
Developers, in general, tend to write clean, good looking, and efficient code. But the most important thing is the look & feel of the final product — an app in the App Store everyone will adore.
To achieve that, we sometimes need to use 3rd party libraries to ship new features faster. And every piece of code, library, or framework we add to the project counts towards the final binary size of the app.
That’s all great since we usually don’t bother much until the app is still within an acceptable size. I will not discuss what app size is adequate and whatnot since this is a mostly subjective thing. But everyone has its opinion on that.
App Clips
This year WWDC brought as a new little thing to play with called App Clips. Without further explanation of what they are, here is the quote from Apple’s website:
“An App Clip is a small part of your app that’s discoverable at the moment it’s needed. App Clips are fast and lightweight so a user can open them quickly.”
The main thing about App Clips is that they are small. But how small? Really small, and I mean it. It’s not that they are small in terms of a few dozen MBs, but they are tiny. The hard limit for App Clips is 10 MB in size, but that’s not the whole story. Someone would argue, eh, that’s fine, we can remove some chunks of the code, and we are quickly at 10 MBs. Well, maybe. Maybe not. Here is the thing. This limit refers to the uncompressed size, which is the app’s size after it is downloaded and installed on the device.
Does that make a difference? Oh, it does. In reality, it means that the size of the downloaded app is below 5 MBs. That is something.
I’ll not discuss the whole process of app thinning in this article. But in the end, I’ve managed to shrink my app from 36+ down to 9.5 MB of uncompressed binary size.
Measuring the app size
Now that we are set with the requirements and the terminology, let’s see how we can measure the final binary size before it’s deployed to the App Store.
First, you’ll need to prepare an archive of the project.
Tap “Product” → “Archive” and wait until the “Organizer” is opened. If it doesn’t open automatically upon archiving is finished, open it from the menu by tapping “Window” → “Organizer”.
Get Borut’s stories in your inbox
Join Medium for free to get updates from this writer.
Now follow the next screens below…
You’ll be prompted with a modal sheet to select the location of the archived project. Now navigate to the just saved folder in Finder and open “App Thinning Size Report.txt” file. You should see the report details for all variants that will be distributed to the App Store.
The important thing here is to look at the last entry, named “{Product}.ipa”. In my case, this is “AppClip.ipa”, a universal variant that we should look at.
Before
The size of the app before I’ve started thinning it was 16,5 MB compressed and 36,6 MB uncompressed. As you can see, the difference between downloaded and installed app size is quite significant.
After
Here is the size of the app after the thinning process. I call it the new “normal”. Compressed size is 3,4 MB, uncompressed just under the allowed limit at 9,3 MB.
Recap
Whenever you need to lose some size of the app (for the sake of the App Clip or other reasons), this is an excellent way to examine the actual size of the app that will take effect in the App Store. I wasn’t aware of that until I needed it for the App Clip.
p.s.: I need to mention that this size can vary a bit from the size in the App Store since the encryption sums up values a bit.









