Reducing the Size of Cash App for iOS
Article Summary
Cash App cut their iOS app size in half in one year. Here's the playbook they used to get from 245 MB to 126 MB downloads.
John Szumski from Cash App shares how their team systematically reduced both download and install sizes while maintaining four separate binaries (app, widget, and two Siri extensions). They used Emerge Tools and Bazel to identify and eliminate bloat across their modular codebase.
Key Takeaways
- Dependency pruning saved 60 MB download by removing duplicate code across 4 binaries
- Resource optimization with ImageOptim and runtime generation cut 11 MB downloads
- Compiler flags and indirect enums reduced code size by 18 MB
- Pre-merge Starlark tests catch dependency mistakes before CI runs
- Install size dropped from 608 MB to 303 MB on iPhone 13
Cash App reduced iOS download size by 49% (245 MB to 126 MB) through systematic dependency pruning, resource optimization, and automated size checks.
About This Article
Cash App's four separate binaries included an app, widget, and two Siri extensions. Each one used static frameworks, which meant dependencies like CashKotlin and UI code got duplicated up to four times in a single App Store release. This created a lot of unnecessary bloat.
John Szumski's team used Bazel query tools to map out the dependency chains. They then refactored the modules to pull app-specific code out of the shared logging and utility layers that the extensions didn't actually need.
Cash App set up Emerge size checks before merging code and ran analysis after each App Store upload. This stopped new bloat from creeping back in and kept their binary under the 200 MB cellular download limit that customers care about.