Mobile Development 14 min read

iOS App Package Size Optimization: Necessity, Metrics, and Technical Solutions

Facing a 420 MB iOS bundle that hurt download conversion, Baidu APP launched a comprehensive size‑optimization project—covering compiler flags, image and resource slimming, code deduplication, and build‑architecture upgrades—that trimmed 50 MB (≈12 %) of the package, boosted conversion rates, and set a benchmark for industry‑wide iOS app size management.

Baidu Geek Talk
Baidu Geek Talk
Baidu Geek Talk
iOS App Package Size Optimization: Necessity, Metrics, and Technical Solutions

Ba​idu APP, a super app with daily active users over 100 million, has grown from a few tens of MB to over 420 MB, causing download conversion and uninstall issues.

In Q3 2022 a package‑size optimization project was launched, covering compiler optimizations (OC/Swift/C++ LTO, stripping symbols, third‑party SDK), image optimizations (removing unused images, HEIC, Asset Catalog, compression), resource slimming (large resources, unused config files, duplicate resources), code slimming (unused classes, methods, modules, duplicate code, tool‑class reduction, AB experiment consolidation) and build architecture improvements.

With normal business iteration the project saved 50 MB, reducing the Baidu APP size from 395 MB (July) to 352 MB (December), while peer apps such as WeChat, Douyin and Kuaishou grew in size.

Why package size matters

According to Google Play data, each 6 MB increase reduces download conversion by 1 %; a 10 MB reduction can raise global conversion by 1.75 %.

On iOS, packages larger than 200 MB cannot be downloaded over cellular on iOS 13‑ and require manual settings on newer versions, hurting user acquisition.

Large packages also increase device storage usage, can become the first item removed when storage is low, and degrade launch performance and increase crash risk.

iOS package generation

After uploading an IPA to App Store, App Thinning creates device‑specific slices; the final installed size differs from the download size.

Package size metrics

Download package = compressed .ipa file.

Installation package = uncompressed size on device.

App Store shows installation size, not download size.

Components of an iOS package

The IPA consists of Mach‑O binaries, Watch apps, widget components, custom dynamic libraries, Swift system libraries, Assets.car, bundled images, and other configuration files (plist, js, css, json, model files).

Industry analysis

Analysis of major domestic and foreign apps shows that QQ and WeChat exceed 500 MB, Baidu and Douyin around 380 MB, Kuaishou ~320 MB, while Meituan, Taobao and Toutiao are ~250 MB. Foreign apps like Facebook and YouTube are ~280 MB.

Foreign apps rely heavily on custom dynamic libraries (e.g., Facebook 53 libraries, main Mach‑O only 8.3 MB). Domestic apps typically have ~6 custom libraries.

Swift adoption is increasing; most domestic apps now include Swift libraries after ABI stability.

Asset Catalog is the dominant image resource format; Meituan uses more bundles with WebP optimization.

Ba​idu APP’s image resources (asset + bundle) total 94 MB, indicating large optimization potential.

Technical solutions

Resource optimization : 30 MB of resources (plist, js, css, json, model files) identified; 16 MB are large single files (>80 KB). Strategies include large‑resource reduction, removing unused config files, and deduplication.

Image optimization :

Unused image detection via custom tool scanning OC/Swift/XIB/HTML/JS/CSS/JSON/PLIST and filtering dark‑mode, numeric sequences.

Asset Catalog to deliver only device‑specific resolutions.

Convert PNG/JPEG to HEIC (≈50 % size reduction) and WebP for alpha‑channel images where HEIC compatibility is an issue.

Use TinyPNG for images <100 KB to avoid CPU overhead of WebP.

Compiler optimization : Enable LLVM options such as LTO, symbol stripping, and other flags for Objective‑C, C++, Swift, and resource compression.

Code optimization : Remove unused classes, methods, modules; refactor duplicate code; slim tool classes; solidify AB experiments.

Build architecture : Adopt Xcode 14 with improved parallel compilation and thinning, achieving up to 30 % download size reduction (26 MB saved for Baidu APP, 6.5 % overall).

Results

The optimization yielded a 50 MB reduction (≈12 % of the original size) and improved download conversion. The most effective gains came from engineering‑level optimizations, followed by compiler, image, resource, and code slimming.

Conclusion

The article outlines the necessity of iOS package size optimization, distinguishes download vs installation metrics, details package composition, presents industry benchmarks, and describes Baidu APP’s comprehensive technical plan and achieved benefits. Future work will dive deeper into each optimization technique.

Mobile DevelopmentiOSCompiler Optimizationresource-compressionApp Size OptimizationPackage Analysis
Baidu Geek Talk
Written by

Baidu Geek Talk

Follow us to discover more Baidu tech insights.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.