How to improve iOS build times with modularization
Recent Posts
- chinna chinna aasai instrumental ringtone - Sathiya Ringtone
- o meri laila ringtone download - ohmygod radhekrishnastatus radhekrishna flute instument ringtone whatsapp status story
- tarara song download - New WhatsApp Status New Krishna Flute Ringtone OMG movie flute Ringtone CREATOR NABIN
- sikotar maa ni ringtone - नई भकत रगटनBhakti Ringtone Krishna bhajan Ringtone status4khd
- sidhu moose wala song ringtone - Dil Diya Hai Jaan Bhi Denge Song Karma Mobile Piano Tutorial shorts viral trending music
- ramayan ringtone mp3 download - doraemon instrumental ringtone and status
- mobile ringtones tamil cut songs - doraemon ringtone instrumentalbest ringtone abhiringtone bestringtone
- santali ringtone mp3 download - do pal ruka instrumental music shorts youtube youtubeshorts shayari bollywoodsongs
- iphone ringtone download - Pal Pal Afusic Ringtone ll Viral Instagram Ringtone ll New Ringtone 2025 ll Hindi Ringtone
- malayalam cut songs - YouTube
- manmadha movie ringtones download - Mammootty Be Notorious EndCredit Version Dialogue Ringtone Bgm media
- fast ringtone - Heart Touching flute Ringtone InnisaiPaadivarum Flute cover by RajeshBest flute tone15M
- kurchi madatha petti song download - Brotherlike trending anna tamil jilla bgm slowmo brother
- dil ke paas ringtone download - Sai pallavi into bgm Amaran movie ringtone saipallavi amaran bgm viralvideo ringtone army
- ankhiyon ke jharokhon se ringtone - New Ringtone 2025 Mp3 romantic flute Ringtone South Indian BGM music Ringtone viralvideo
- govinda ringtone - Amaran bgm amaran amaranmovie saipallavi saipallavistatus stageshow violin tamilsong like
- en maman anbukku song download - Alaipayuthey BGM Ringtone love BGM Status
- ringtone download telugu mp3 - Alaipayuthey BGM ringtone
- south indian classical music ringtones - AlaiPayuthey BGM whatsapp status ringtone OVI CREATIONS
- no entry ringtone - Alaipayuthey bgm for whatsapp status
- govinda govinda ringtone download - radhe radhe bol mana status ringtone
- dekha hazaro dafaa song download - Pushpa 2 Sreeleela dance Kiss kiss kiss ki song sreeleela pushpa2 explorepage trendingsong
- hath rakh de dil pe - Pushpa 2 Kissik BGM ringtone download kissik pushpa2 mobileringtone bgms mbgms 1k
- tu mujhe kabool ringtone - 2025 Beautiful Love Ringtone Bujji Thalli Instrumental Ringtone
- touch wood tere vaste ringtone - Bujjithalli Song Ringtone Telugu Thande l Naga chaitanya Sai pallavi Dsp
- chinna chinna vanna kuyil ringtone - Nee Kosam Bujji Thalli Song Ringtone New Ringtone 2025 Tamil Bgm Ringtone Rocky Creations
- tere mere ringtone - Bujji Thalli Song Bgm Ringtone Thandel Naga Chaitanya Sai Pallavi DSP Rocky Creations
- na ringtone download - Game Changer Mass Bgm Unpredictable Bgm gamchanger bgm ramcharan ringtone viralvideo
- lulululu ringtone - Game Changer Unpredictable BGM Ringtone Download Link RABGMs
- uyire ringtone download - GameChanger Unpredictable BGM ringtone downloadlink gamechangerteasertheme
- inkem inkem instrumental ringtone download - Raa Macha Macha Song Ringtone Game Changer Bgm Thaman S Ram Charan Kiara Advani Shankar
- govind bolo hari gopal bolo - Raa macha macha song Ram charan Shankar Thaman S song trending shorts
- om shanti om instrumental ringtone - Raa Macha Macha song Edit Game changer songs Ram charan fans edition
- sathiya tune kya kiya ringtone - Jaragandi Jaragandi song jaragandi trending dancekiaraadvanigamechanger ramcharan
- sms tone - jaragandi jaragandi song ringtone game changer Jaya krishna
- humko humise chura lo ringtone - Jaragandi Tamil Ringtone Game Changer Download link
- fir bhi tumko chahunga ringtone - Game Changer Jaragandi song BGM Ram Charan Kiara Advani Shankar movie
- en pondati nee song download - Peelings Allu Arjun song anirudh beast pushpa2songs bollywood pushpa trending shorts tamil
- heart touching flute ringtone download - Peelings Allu Arjun pushpa 2 song trending shorts iamsainik ytshorts shortsfeed
- rakhi ringtone - Pushpa 2 Peelings Song Ringtone Allu Arjun Reshmika Dsp shortvideo status
- premika ne pyar se ringtone - Peelings BGM Ringtone Pushpa 2 Song Peelings Song Ringtone
- jitni dafa dekhu tujhe ringtone - peelings song ringtone hd alluarjun
- new latest ringtone - Peelings song pushpa 2 DOWNLOAD Pushpa 2 BGM ringtone Pushpa 2 songs Peeling song rington
- maay bhavani ringtone download - Hoti hai feelings in violininstagram new song rashmika top10 shortsfeed newsong instagram
- mangal bhavan amangal hari ringtone - Carol of The Bells Ringtone
- ringtone chips - Carol of the Bells Ringtone Download link in description
- free fire song download mp3 - Carol of the Bells BGM WhatsApp status
- ganesh ringtone mp3 download - Carol of the Bells carolofthebells piano music
- suniya suniya ringtone - carol of the bells piano pianoboy perfectpiano pianocover music pianoworks tutorial
- Carol of the Bells RELEASE twomoredays christmas violin shorts - Carol of the Bells RELEASE twomoredays christmas violin shorts
- Carol Of The Bells BGM Ringtone for Cell Phone - Carol Of The Bells BGM Ringtone for Cell Phone
- status song sreeragamoshorts - status song sreeragamoshorts
- Sreeragamo malayalam movie ringtone whats app status Pavithram Mohanlal Shobhana - Sreeragamo malayalam movie ringtone whats app status Pavithram Mohanlal Shobhana
- Sreeragamo film song short music - Sreeragamo film song short music
- Feel the music sreeragamo feeling song - Feel the music sreeragamo feeling song
- YouTube - YouTube
- Diljit Dosanjh Born To Shine LYRICS EDIT shorts song - Diljit Dosanjh Born To Shine LYRICS EDIT shorts song
- born to shine diljit paji status whatsapp status Jatt diljitdosanjh music subscribe - born to shine diljit paji status whatsapp status Jatt diljitdosanjh music subscribe
- Indru netru naalai song lyrics hiphop tamizha Vishnu shorts viral - Indru netru naalai song lyrics hiphop tamizha Vishnu shorts viral
- 8 years love journey indru netru naalai song true love never ends - 8 years love journey indru netru naalai song true love never ends
- Kadhale kadhale Song Whatsapp Status Indru Netru naalai Tamil whatsapp status shortslovestatus - Kadhale kadhale Song Whatsapp Status Indru Netru naalai Tamil whatsapp status shortslovestatus
- இனற நறற நள indru netru naalai whatsapp status love full screen whatsapp status tamil - இனற நறற நள indru netru naalai whatsapp status love full screen whatsapp status tamil
- indru netru naalai song status ll Ringtone ll WhatsApp status ll - indru netru naalai song status ll Ringtone ll WhatsApp status ll
- indru netru naalai manathodu mattum songs ringtone favourite video WhatsApp status - indru netru naalai manathodu mattum songs ringtone favourite video WhatsApp status
- indrunetru naalai kondapogum Kadhal love feelingfavourite songs ringtone favourite ringtone songs - indrunetru naalai kondapogum Kadhal love feelingfavourite songs ringtone favourite ringtone songs
- Netru indru naalai movie best bgm best lovers bgmslove feeling bgm indru netru naalai movie - Netru indru naalai movie best bgm best lovers bgmslove feeling bgm indru netru naalai movie
- Indru Netru Naalai song BGM Blissful Music - Indru Netru Naalai song BGM Blissful Music
- Indru netru naalai movie bgm watsapp statuslove couple candycreation - Indru netru naalai movie bgm watsapp statuslove couple candycreation
- AKKA MAGA College students dance performance tamil song tiktoktamil360 shorts collegevlog - AKKA MAGA College students dance performance tamil song tiktoktamil360 shorts collegevlog
- Akka Maga College girls tamil song dance tiktoktamil360 shorts collegevlog tamildance - Akka Maga College girls tamil song dance tiktoktamil360 shorts collegevlog tamildance
- Akka maga akka maga shorts love song - Akka maga akka maga shorts love song
- Akka maga remix song status WhatsApp status JP Creations - Akka maga remix song status WhatsApp status JP Creations
- TOP 5 Most Viral BGM Marco Rolex KGF Beast Wahran shorts trendingnow - TOP 5 Most Viral BGM Marco Rolex KGF Beast Wahran shorts trendingnow
- Red Sea X Badass Mix BGM Ringtone Leo x devara Best remix BGM Use headphones - Red Sea X Badass Mix BGM Ringtone Leo x devara Best remix BGM Use headphones
- Pushpa2 songs effect on exams comedy funny pushpa2 sreehachannel - Pushpa2 songs effect on exams comedy funny pushpa2 sreehachannel
- Pushpa 2 dhamunte patukora pushpa2 dance music comedy song shortfeed - Pushpa 2 dhamunte patukora pushpa2 dance music comedy song shortfeed
- Dekha ek khwaab Flute flute music sandeepsahani vlog shorts - Dekha ek khwaab Flute flute music sandeepsahani vlog shorts
- DEKHA EK KHWAB TO YE SILSILE HUE FLUTE COVER shorts flute flutecover music - DEKHA EK KHWAB TO YE SILSILE HUE FLUTE COVER shorts flute flutecover music
- dekha ek khwaab to silsile hue flute music song flower gardenshorts - dekha ek khwaab to silsile hue flute music song flower gardenshorts
- Various flowers natural seen with Dekha Ek khwaab Flute cover music love music shorts nature - Various flowers natural seen with Dekha Ek khwaab Flute cover music love music shorts nature
- dekha ek khwab flute flutemusic ringtone music song feelthemusic dance 26february - dekha ek khwab flute flutemusic ringtone music song feelthemusic dance 26february
- dekha ek Khwab flute cover khwab krishna bhajan flute ringtone status shortsfeed trending - dekha ek Khwab flute cover khwab krishna bhajan flute ringtone status shortsfeed trending
- Dekha ek khwab flute version flutesong new instrumentalsong music song Basantflute - Dekha ek khwab flute version flutesong new instrumentalsong music song Basantflute
- Krishna Green Gold status Flute shorts greengold chhotabheem krishna - Krishna Green Gold status Flute shorts greengold chhotabheem krishna
- Pogo krishna cartoon flute song flute shorts childhood memory acha lage to subscribe krna - Pogo krishna cartoon flute song flute shorts childhood memory acha lage to subscribe krna
- Tu mala anguracha mi lakdi bhusa g tdm marathi shorts short shortvideo subscribe song songs - Tu mala anguracha mi lakdi bhusa g tdm marathi shorts short shortvideo subscribe song songs
- tu mala anguracha mi lakdi bhusa lyrics song 2024 song shorts newsong viral marathi status - tu mala anguracha mi lakdi bhusa lyrics song 2024 song shorts newsong viral marathi status
- Tu mala anguracha me lakadi Bhusa ga Love song Marathi trending song - Tu mala anguracha me lakadi Bhusa ga Love song Marathi trending song
- tu mala anguracha songmarathimulgi youtube youtubesho trendingshorts viralreels music love - tu mala anguracha songmarathimulgi youtube youtubesho trendingshorts viralreels music love
- Hass Hass Diljit Dosanjh Aesthetic Lyrical Edit songs hasshass diljitdosanjh lyricsedit - Hass Hass Diljit Dosanjh Aesthetic Lyrical Edit songs hasshass diljitdosanjh lyricsedit
- Squid Game Ringtone shorts - Squid Game Ringtone shorts
- Lezginka shortvideo cantstoplovingyou horse cantgetoveryou edit music dance cantloseyou - Lezginka shortvideo cantstoplovingyou horse cantgetoveryou edit music dance cantloseyou
- Rỵกง Chubina Ringtone Ninja Ringtone New Call Ringtone Viral Ringtone Feel Bgm Ringtone - Rỵกง Chubina Ringtone Ninja Ringtone New Call Ringtone Viral Ringtone Feel Bgm Ringtone
- Squid game 2 edit mingle song funk version squidgames2 edit - Squid game 2 edit mingle song funk version squidgames2 edit
- Chub1naGe music in ringtone music relatable vinlandsaga cover shorts - Chub1naGe music in ringtone music relatable vinlandsaga cover shorts
- Montagem Alucinante Rushex New Ringtone Mp3 Ringtone Hindi Ringtone caller tuneringtone - Montagem Alucinante Rushex New Ringtone Mp3 Ringtone Hindi Ringtone caller tuneringtone
- Departure Lane BGM Ringtone 2025 - Departure Lane BGM Ringtone 2025
- 2025 ka ringtone ll new ringtone 2025 ll 2025 happy new year ringtone ll 2025 ringtone ringtone - 2025 ka ringtone ll new ringtone 2025 ll 2025 happy new year ringtone ll 2025 ringtone ringtone
- Janat Zubair With her friends buddhu sa mann hai song janatzubair trending shortvideo shorts - Janat Zubair With her friends buddhu sa mann hai song janatzubair trending shortvideo shorts
- Sanam Teri Kasam Song ringtone Love Ringtone 2025 Sanam Teri Kasam Ringtone Instrumental - Sanam Teri Kasam Song ringtone Love Ringtone 2025 Sanam Teri Kasam Ringtone Instrumental
Most mobile teams understand and appreciate the benefits of fast build times. Being able to quickly compile and test your code means quicker development and iteration, which in turn allows your team to ship more regularly and efficiently. But actually achieving fast build times, and implementing a long-term solution that keeps build times fast as your codebase grows, can be a complex undertaking. There are a number of different tactics, and while some are relatively trivial â reducing the size of bundled resources, for example â others can be much more involved, or even kind of dangerous (think questionable compiler tricks)!Â
Luckily, the riskiest build time improvement techniques are rarely necessary. Instead, most teams will achieve build time success by implementing some of the more common approaches incrementally as their codebase grows and resources scale.
Modularization is one such approach that teams can gradually adopt to improve and stabilize build times. It establishes an architecture that allows scaling applications and codebases to grow while keeping build times in check. In this post, weâll look at how all this plays out in the iOS world (though there are certainly themes common to all platforms here). Weâll first examine what contributes to slow build times and how modularization can help. Then, weâll zoom in on the more advanced API/Impl modules technique which can help you achieve even quicker compilation of interdependent modules and faster build times for apps containing hundreds of modules.
What causes slow iOS build times?Â
Improving build times isnât just a matter of implementing a specific fix once builds get slow; it requires an understanding of what causes bottlenecks in the compiler and preemptive changes to the architecture of the project to address those causes. Where those bottlenecks exist and how they came about in the first place can vary dramatically from project to project. In order to anticipate future issues, itâs important to first understand how iOS apps typically evolve. Letâs start with the example of a very simple single-view app â we can then examine the kinds of problems it will face as it grows, and what we can do to solve them.
The evolution of an iOS app and impact on build times
The single-module app
Let's say weâre creating a note-taking app, and after some weeks of development, weâve built a simple app such that the whole app is contained within a single module in the main app target:

We know nothing about modularization, and we also havenât been particularly intentional about the architecture of the app. Because our app only has a handful of simple features, Appleâs out-of-the-box MVC architecture fits the bill just fine. This is how most beginners usually develop their first few apps, and even how seasoned developers will still spin up apps that are relatively modest in scope.
While single-module apps are naturally some of the easiest to maintain, their architecture is one of the worst when it comes to build times. When everything is packed together into a single module, changing anything in the codebase results in everything being recompiled, even if the change is small or in an area of code thatâs otherwise decoupled from the rest of the codebase. While this doesnât pose a problem for small and simple apps, for larger, more complex apps, build times take massive performance hits with this approach.
The small multi-module app
Thankfully, a better approach presents itself immediately: modularization, or the breaking up of a codebase into multiple component modules. Instead of having a monolithic, large (and ever-growing!) codebase containing all of the appâs functionality and resources, divide that up into several smaller, self-contained modules that are linked together in the app's bundle. Any time one module needs to reference code or functionality from another module, it imports it, creating inter-module dependencies. In our notes app example, imagine that each of the three main pieces of functionality for the app (Notes, Editor, and Subscription) is broken out into its own module:Â

The overall functionality of the app remains the same, but better modularization of the codebase allows the compiler to be smarter about what needs to be recompiled every time a change is made. In this example, a change to the Notes module wonât require recompilation of the Editor and Subscription modules because there is no dependency between them. This allows Xcode to reuse a cached compilation of the unaffected modules, resulting in a significant reduction in overall build time.
Another benefit of modularizing your app by breaking it down into smaller, discrete components is that it unlocks development in isolation â changing the build target in Xcode to that of the particular module youâre working on means that it alone gets built, speeding up development significantly if youâre making changes that don't require actually launching the app.Â
Nowadays, most medium-to-large iOS apps out there have this sort of multi-module architecture, and itâs one of the most common and clearly-defined approaches for tackling slow build times as the size of the codebase increases.

The large multi-module app
Unfortunately, modularization alone isnât enough to prevent slow build times â in fact, as modularization increases, it can become a contributor to slower build times if not well implemented. Most real-world apps wonât have simple dependency graphs like the one in our previous example, and especially as an app grows and more modules are added, the dependency graph becomes more and more complex:

As an app is broken down into more and more modules, and as entirely new modules are added, there will inevitably be more interdependencies between all of them. And more of these transitive dependencies leads to less effective modularization overall. Incremental builds no longer only recompile the module that changed â they also recompile any modules that are affected by that change. We already know that changes to a specific module will cause it to be invalidated (and recompiled), but if we have something that depends on that module, then that module will also be invalidated, along with any other modules that depend on it in turn. As a result, apps that are heavily modularized but have complex dependency graphs will soon run into build time issues once again.
Returning to our notes app example â three of its modules (Notes, Editor, and Subscription) have nothing depending on them, so theyâll continue to compile quickly when changes are made to any of them. But changes to any other module in the notes app will entail invalidation and recompilation not just of that module itself, but of all other modules that depend on it as well. Take the new HTTPClient module for example: because all the other modules depend on it (either directly or indirectly), any changes made to it will cause the entire app to be recompiled, even if the changes are not at all relevant to or needed by those other modules!
In a small project with only a dozen or so modules, interdependencies between modules arenât a huge problem, but as your app grows to contain hundreds of modules, the effect all this recompilation has on build times becomes increasingly noticeable and unsustainable. Imagine the importance for even larger products: the Spotify and Facebook apps, for example, each contain close to a thousand modules.

Both build times in general, and this modularization âgotchaâ in particular, represent a very common and acute problem area in large iOS projects. Many large companies for whom developer happiness and productivity is an important concern devote significant resources to addressing it â even going as far as forming dedicated platform teams responsible for modularization and architecture improvements to keep build times in check.
And at this scale, keeping build times in check means fundamentally changing how you think about modularization.
Modularization at scale: moving from vertical to horizontal dependencies
Let's assume that our fictional notes app kept growing and is now in this mega-modularized situation. We now have close to a hundred modules, and changing any one of them results in extremely long build times. Yikes!
As we discussed, the root of the problem is the presence of so many transitive dependencies. Of particular concern are so-called vertical dependencies: any given module âstacks upâ dependencies not just on modules it itself depends on, but also on any modules those modules depend on in turnâ even if that first module on the bottom of the stack has no direct need for those others.
To improve things, we need to minimize this type of vertical dependency, in effect reducing the number of âstackedâ dependencies each module has. The goal is to make our dependency graph as horizontal as possible.

By reducing the number of downstream dependencies of each module, we minimize the number of modules that are invalidated and recompiled on each incremental build. But how do we start to break down long chains of vertical dependencies across modules without affecting their functionality?Â
API/Impl Modules
The key to solving the vertical dependency problem is realizing that you don't need explicit dependencies to access functionality across different modules. By building a way to reference the functionality of a module without explicitly depending on it, we can start to minimize the number of cross-module dependencies, simplifying our dependency graph and keeping build times under control.
But how is this accomplished? If there is no dependency between two modules, how can one access the functionality of the other?
To answer that, we need to change how we think about dependencies. The inherent problem isnât about depending on other modules, but rather about depending on other modules which change often. Modules that contain concrete implementations of functionality are more prone to frequent changes and carry with them additional dependencies. By contrast, modules containing only APIs (defined as protocols or extensions, for example) change more rarely, and can be easily decoupled from their implementation â meaning they should be invalidated and recompiled much less often.
An advanced technique known as API/Impl Modules takes this concept of decoupling APIs from their implementation and applies it to modularization, such that a moduleâs API is broken out into a separate API module. If a different module needs to import some functionality, instead of referencing the functionalityâs concrete implementation module, it references the API module instead. Importing concrete implementation modules should be forbidden, with no exceptions, in order to prevent costly dependencies across implementation modules from forming.

Architecting modules this way leads to considerably faster incremental build times because the majority of a codebaseâs changes will be happening in the concrete implementation modules â which have been decoupled from the rest of the codebase in terms of dependencies. By contrast, the API modules, which do still play a bigger role in the dependency graph, will be changing much less frequently.
But one last mystery remains â someone, somewhere, does have to reference the otherwise-decoupled concrete implementation modules. Who, and how?
Dependency injection
A key prerequisite for this kind of architecture is the existence of a dependency injection framework. Where previously modules were referencing other modules directly, dependency injection can be used instead to coordinate module interdependencies via a central engine. The dependency injection engine knows of every single module that the app contains, and injects dependencies where needed across the app.

Although the concrete modules cannot depend on each other, there's always going to be a module that imports everything: the âlowestâ module in the dependency graph, where the AppDelegate is most likely going to be. When the app first launches, the dependency injection engine builds a list of all available features in the app and their corresponding APIs.
At a high level, when a module requires access to a feature in another module, it can fetch it by grabbing the equivalent "referenceable" protocol in that feature's API module and sending a request back to the dependency injection engine. Since the engine holds a reference to all modules in the app, it can locate the correct feature module which provides a concrete implementation of that particular API, and inject it back into the module that requested it.
Most large companies build their own dependency injection frameworks, but there are a few open-source options out there, like Swinject, and some proof-of-concept frameworks with example projects, like RouterService (written by me!). These are a great place to start to explore different approaches for implementing dependency injection in your codebase.
Making changes to the dependency injection engineâs module will always result in the longest build times,as it will invalidate the entire application. But by keeping the dependency injection module as small as possible and isolating all of the app's logic into separate (horizontal) modules that reference other modules only through their feature APIs, you can achieve a great build experience even with an app containing over a thousand modules.
Keep build times in check as you grow, with an incremental approach to modularization
Weâve seen how modularization, when correctly implemented, can be a powerful tool for improving slow build times in your app as it grows from a simple project to a more complex one made up of lots of features that depend on each other. Although it might seem daunting, reaping the benefits of modularization doesnât necessarily mean spending months rearchitecting your entire codebase; modularization allows for a more incremental approach whereby pieces of functionality are broken off into their own modules slowly, over time. And eventually, once you reach the point of having too many interdependent modules, the API/Impl modules approach to modularization can provide significant build time improvements even at hundreds-of-modules scale. Many large companies with huge codebases (like Spotify!) have successfully used this technique to improve build times and boost productivity for the entire team as a result.
â