Loading…
How the Tinder iOS App reduced the size of our localizations by 95% using Emerge
TinderTinder
Summary
Supporting over 50 languages across numerous statically linked targets led to a substantial build size footprint in Tinder's iOS application. Because Apple's code signing mandates a minimum 4KB per file, shipping dozens of localized files per target inflated the final application package. Tinder addressed this by stripping comments and whitespace, merging localized strings into a single file per language via custom Bazel rules and Aspects, and compressing the strings using Emerge's SmallStrings tool into LZFSE files. The runtime decompresses these files dynamically through existing code-generated string accessors. Consequently, Tinder reduced download size by 10.7MB and install size by 51.3MB with no impact on developer workflows.
Context
Tinder supports over 50 languages across more than 190 countries, resulting in at least 50 localization files per build target for static linking. Apple's code signing imposes a minimum overhead of 4KB per file regardless of content size, significantly inflating the final IPA size.
Approach / What changed
Tinder stripped translator comments and whitespace, then used custom Bazel rules and Aspects to merge localization files into a single file per language. They integrated Emerge's SmallStrings to compress keys and language values into LZFSE files decompressed dynamically at runtime via existing code generation.
Takeaways
- Apple code signing requires at least 4KB per file, making high file counts a major contributor to application binary bloat.
- Collapsing per-target localization files into a single file per language reduced Tinder's download size by 5.5MB and install size by 30.1MB.
- Compressing strings with Emerge SmallStrings into LZFSE files saved an additional 5.2MB in download size and 21.2MB in install size.
Related reading
Tinder ·
Sharing Tinder’s latest contributions to the open source community
Tinder open-sourced several iOS development repositories, including Layout, Nodes Architecture Framework, and CombineUI, to share the engineering patterns supporting its iPhone application. As the app expanded across diverse device profiles and scale, engineering teams faced reliability, consistency, and memory challenges under their legacy architecture. In response, Tinder developed Nodes, a plugin-based architecture framework using compile-time dependency injection and lifecycle hooks that enforce complete memory release upon feature dismissal. For interface construction, Tinder created Layout, a domain-specific Auto Layout wrapper offering declarative syntax for UIKit views to eliminate storyboard merge conflicts while preserving native capabilities. The resulting stack enables isolated testing of business logic, native reactive event binding, and incremental adoption of SwiftUI across the codebase.
TinderTinder ·