Tokopedia Arya Surya Apr 20, 2021

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

Critical Insight

By extracting shared components into a separate framework, teams can begin reducing build times while maintaining a working app throughout the modularization process.

The tutorial includes a complete GitHub repo with starter code and reveals the specific bundle loading gotchas that crash most first attempts at modularization.

About This Article

Problem

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.

Solution

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.

Impact

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.