App size creeps up slowly. One release adds an analytics SDK, the next adds a few full-resolution onboarding images, and later someone bundles a font family "just in case." No single change looks important, but together they make downloads slower and updates heavier, and the app becomes easier to delete when a phone runs low on storage.

This post is a practical pass at reducing app size on iOS and Android for a small team. The rule is simple: measure what users actually download before you cut anything, then work from the largest contributor down.

Step 1: Measure the right number

The file on your build machine is not what users download. Both stores deliver device-specific variants, so a universal build can look much bigger than what reaches any single phone. Measure the thinned, per-device size first.

iOS: the App Thinning Size Report

Export your archive with thinning enabled. In the ExportOptions.plist you pass to xcodebuild -exportArchive, add:

<key>thinning</key>
<string>&lt;thin-for-all-variants&gt;</string>

The export folder will then contain an App Thinning Size Report.txt with compressed (download) and uncompressed (install) sizes for each device variant. After you upload to App Store Connect, the build's metadata also lists estimated sizes per device. Pick one or two representative devices and track those numbers.

Android: bundletool and the Play Console

If you ship an Android App Bundle, generate the device-specific APKs locally and ask bundletool for the sizes:

bundletool build-apks --bundle=app-release.aab --output=app.apks
bundletool get-size total --apks=app.apks --dimensions=SDK,ABI

This shows the minimum and maximum download size across the dimensions you choose. The Play Console also reports download and install size for your releases. To see what is inside, open the bundle or an APK in Android Studio's APK Analyzer (Build > Analyze APK). It breaks the size down by DEX files, resources, native libraries and assets.

Write the baseline down

Record the current numbers in a small table in your repo or release notes, with columns for platform, device or ABI, download size and install size. Each change you make should move one of those numbers. If a change doesn't move them, revert it and spend the effort somewhere else.

Step 2: Find the biggest contributors

Usually one category dominates, and in most small apps it's one of these:

  • Images and media: oversized PNGs, onboarding videos, and audio that was never compressed.
  • Native libraries: on Android, .so files for every ABI; on iOS, binary frameworks pulled in by SDKs.
  • Third-party SDKs: analytics, ads, and a social login used by a small share of users.
  • Fonts and localization data: whole font families when you use two weights, and translations for locales you never shipped.
  • Code: rarely the biggest item, though generated code and reflection-heavy libraries add up.

Sort by size and work down the list. Saving a few kilobytes in a utility class won't matter much if a single video in the bundle is larger than the rest of your code.

Step 3: Cut assets first

Asset changes have low risk and often save the most, so start here.

  1. Use the platform's asset systems. On iOS, keep images in asset catalogs so the App Store can deliver only the scale each device needs. On Android, ship density-specific drawables or vector drawables, and the App Bundle will split them by density.
  2. Prefer vectors for icons and simple illustrations. SF Symbols and Material icons cost almost nothing. For custom icons, use PDF or SVG vectors in asset catalogs on iOS and VectorDrawable on Android.
  3. Re-encode raster images. Photos usually compress much better as HEIC or WebP than as PNG. Compare visually on a real device before committing.
  4. Move large, rarely used media out of the binary. If an onboarding video is seen once, consider downloading it on demand and caching it, with a static image as fallback. On Android, Play Asset Delivery and dynamic feature modules can do this. On iOS, look at Apple's current options for downloading assets after install. Only do this if the fallback experience is acceptable offline.
  5. Trim fonts. Ship only the weights you use. If a font is only for a logo, render the logo as a vector instead.

Step 4: Shrink code and resources on Android

Make sure R8 is actually running on release builds. Many projects still have it switched off because of a crash someone hit years ago:

android {
    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
}

Turning on R8 is a behavior change, not just a size tweak. Code accessed via reflection, such as some JSON serializers and dependency injection setups, may need keep rules. Run your full test suite and click through the main flows on a release build before shipping.

Two more Android-specific wins:

  • Limit bundled locales to the languages you actually support. Libraries often bring translations for dozens of languages. Use resourceConfigurations, or the localeFilters setting under androidResources in newer Android Gradle Plugin versions. Check which one your AGP version expects.
  • Check native ABIs. With App Bundles, devices receive only their own ABI, but look in the APK Analyzer for libraries that bundle native code you don't need.

Step 5: Shrink code on iOS

Xcode's defaults are reasonable, but verify a few build settings for your Release configuration:

  • Dead code stripping (DEAD_CODE_STRIPPING = YES) should be on.
  • Swift optimization level: -Osize (Optimize for Size) can reduce binary size compared to -O. Measure both, because it can affect hot paths. If you've tuned launch performance, re-check it afterwards with the approach from our startup time pass.
  • Debug symbols should live in the dSYM, not the shipped binary. Release builds normally strip them; confirm that a custom script hasn't changed this.

Static and dynamic linking also matter. Many small embedded dynamic frameworks add overhead and can slow launch. Where an SDK offers a static or merged variant, try it and measure.

Step 6: Audit dependencies honestly

This is often where the biggest savings are, and it's the hardest step because it's about product decisions rather than build flags. For each third-party SDK, ask:

  • Which feature uses it, and do we know how many users touch that feature?
  • Are we using a small part of a large library? For example, pulling in a whole networking stack for one request, or a full image pipeline for a single avatar.
  • Do two SDKs overlap? Two analytics tools, or two image loaders brought in by different libraries.
  • Can the platform do this now? Recent SwiftUI, Jetpack Compose, and Foundation/AndroidX APIs cover many things that once needed a library.

Remove one dependency at a time and re-measure. Each removal should have a number attached so the trade-off is clear when someone asks later why a library was dropped.

Step 7: Don't break crash reporting

Size work changes symbols and obfuscation. Two things to check before release:

  • On Android, upload the R8 mapping.txt for every release build to your crash reporter and the Play Console. Otherwise stack traces turn into unreadable names.
  • On iOS, make sure dSYMs are still produced and uploaded after you change build settings.

If you haven't set up a reliable symbol upload pipeline yet, our crash reporting and triage guide covers how to do that.

Step 8: Keep it from growing back

A one-off cleanup slowly gets undone. Add a light guardrail instead:

  • Have CI output the size (thinning report on iOS, bundletool get-size on Android) for every release build.
  • Pick a threshold that fits your app, for example a percentage increase over the previous release, and fail the build or post a warning when it's exceeded.
  • Add a line to your pull request template: "Does this add a dependency or large asset? If so, what's the size impact?"

This doesn't need much tooling. A script that compares one number against the last tagged release will catch most regressions.

Wrapping up

App size reduction mostly comes down to discipline: measure the thinned download size, sort contributors by size, and work from the top. Assets and unused dependencies usually give the biggest gains for the least risk. Code shrinking with R8 and Swift size optimization comes next, but it needs testing and working symbol uploads. Then add a size check to CI so the next release doesn't undo the work. Record each number before and after a change, so you can tell which cuts actually made a difference.