Getting Started with iOS App Modularization: Extracting Catalog
Article Summary
Tokopedia's iOS team tackled a common scaling problem: how do you break apart a monolithic app without creating circular dependency chaos?
This hands-on tutorial from Tokopedia Engineering walks through extracting a Catalog feature into its own framework. It's part 2 of a modularization series that shows the practical steps, not just theory.
Key Takeaways
- Create separate frameworks and configure dependencies using Xcode targets
- Use Router abstraction pattern to prevent circular dependencies between modules
- Fix bundle loading issues with Bundle(for: Self.self) for XIB files
- Make classes public and adjust ACL for cross-module access
- Navigation works without tight coupling between feature modules
Critical Insight
A Router abstraction layer lets iOS features navigate between modules without creating circular dependencies or tight coupling.