Getting Started with iOS App Modularization: An Introduction
Article Summary
Tokopedia's iOS team faced a critical problem: their monolithic app took so long to build that it threatened their weekly release schedule.
Arya Surya from Tokopedia Engineering walks through a hands-on tutorial for splitting a monolithic iOS app into modular frameworks. This first part of a three-part series covers the fundamentals and tackles the shared components module.
Key Takeaways
- Modularization lets developers build only needed features, drastically cutting compile time
- Start with least dependent code: extract shared UI components first
- Dynamic frameworks require explicit bundle IDs to access resources like XIBs and JSON
- Access control levels (public vs internal) are critical for cross-module visibility
- Convert to xcworkspace structure before creating separate framework targets
By extracting shared components into a separate framework, teams can begin reducing build times while maintaining a working app throughout the modularization process.
About This Article
Tokopedia's iOS app was built as a monolith, so build times grew as the codebase got bigger. Developers had to compile the entire app even when making small changes to a single feature, which slowed down their work.
Arya Surya's tutorial shows how to restructure the app using xcworkspace and pull out a Shared framework with reusable UI components. This lets developers compile just the modules they're working on instead of the whole app.
After modularizing the Shared framework, developers can build individual features without waiting for a full app compilation. This sets up the team to keep breaking down other parts like the Catalog and Product Detail modules later.