Integrating Extensions into Large-Scale iOS apps
Article Summary
Lyft's iOS team built an Apple Maps extension that lets users book rides without leaving Maps. But the initial version added 45MB to their app—nearly a quarter of Apple's 200MB cellular download limit.
Lyft engineers Artur Stepaniuk and Max Husar share how they integrated ride booking into Apple Maps while managing a highly modular iOS codebase built with Bazel. The challenge: reducing memory footprint and binary size without sacrificing functionality.
Key Takeaways
- Reduced extension binary size from 45MB to 15MB through dependency optimization
- Used Bazel queries and Gephi visualization to map hundreds of module dependencies
- Removed CoreUI module (15MB) by creating lightweight service alternatives
- Extensions have 20-50MB RAM limits and strict API restrictions to manage
- Third-party dependencies with APPLICATION_EXTENSION_API_ONLY flag caused linking issues
Critical Insight
By systematically analyzing their dependency graph and stripping unnecessary modules, Lyft cut their Apple Maps extension size by 67% while maintaining full booking functionality.