XcodeGen and the quest to modularize the Wealthfront iOS app
Wealthfront replaced its checked-in .xcodeproj with XcodeGen-generated projects defined in YAML, which eliminated project-file merge conflicts across seven squads and made build configuration reviewable in pull requests. The same setup is the foundation for breaking up a roughly 2,000-file Swift monolith into local Swift Package Manager modules with compiler-enforced one-way dependencies, declared in an included packages.yml. Build measurements show 2–3 minute fresh builds, with 'Emitting Module' at about 14.5s dominating incremental builds, which motivates the modularization. Eight infrastructure modules have been extracted so far, and the CI pipeline runs xcodegen → pod install → swift package resolve → xcodebuild, with a custom DI container and a routing layer planned next.
Related posts
- How we rebuilt the Shopify app in 12 weeks
Shopify Engineering mediumAdeptThirty engineers rebuilt the 300+ screen Shopify mobile app from React Native to native Swift and Kotlin in 12 weeks, with agents writing most of the code. The key work was building a system around the agents: a shared Reflex architecture for iOS and Android that lets ViewModels run headless from a CLI in milliseconds, CI checks that fail on cross-platform drift, and Helix verifying small checkpoints against the legacy app, which served as the spec instead of written documents. As code generation got faster, the bottlenecks moved to laptops, code review, merging and coordination. Shopify answered with remote dev environments, agent-first adversarial review on small dual-platform PRs, a daily loop that turns review comments into rules, agent-driven merge queues, and pod ownership by product area. Launch time dropped about 50% on Android and 14% on iOS, and the Android binary shrank by 40%.
- How we build SwiftUI features in the Medium application
Medium Engineering mediumAdeptMedium's iOS team builds new iOS 13+ features in SwiftUI and Combine by splitting a monolithic, partly Objective-C codebase into Swift packages: ApolloModel for generated GraphQL models, SharedUI components, per-feature UI packages, and planned LiveService/FakeService packages. Network services are structs returning Combine publishers, with live and fake implementations injected through initializers in a style inspired by Point-Free, rather than being registered in a global service registry. Views take protocol-backed GraphQL fragments so previews and tests can use simple structs, and enum action handlers forward events to custom UIHostingControllers for app-level navigation. Building packages in isolation makes SwiftUI previews fast, though List, NavigationView and Menu still have gaps that require OS-version workarounds.
- Scaling Slack’s Mobile Codebases: Modularization
Slack Engineering mediumAdeptSlack split its monolithic iOS and Android app targets into owned Feature, Service and Library modules with strict linking rules, such as interface/implementation pairs on iOS, to cut build times, untangle dependencies and clarify code ownership. On iOS, adopting Bazel made module creation easy, eliminated project-file merge conflicts, enabled static linking that improved pre-main launch time, and powered code generation for modules, CoreData models and feature flags. On Android, Slack abandoned a per-module Dagger 'graph of graphs' in favor of Square's Anvil, cut KAPT usage by moving to KSP, Moshi and Kotlin data classes, and enabled Gradle configuration caching, saving 20-45s on builds after configuration changes.
- Scaling Slack’s Mobile Codebases: Modernization
Slack Engineering mediumAdeptSlack's year-and-a-half Duplo initiative concluded by modernizing its iOS and Android codebases: iOS moved to a custom VIPER-style feature architecture, stricter SwiftLint rules banning singletons and NotificationCenter, Combine (via CombineX until iOS 12 was dropped), and broader SlackKit adoption, while Android replaced Gson with Moshi, Android Priority Job Queue with WorkManager, and handwritten API calls with an internal Retrofit-based library, and introduced coroutines and Compose incrementally. iOS ended 68% modernized and 81% modularized with CI stability rising from 77% to 90% and average time-to-merge down 64%, Android reached 92% modularization, and local builds later dropped nearly 50% with Bazel and M1 Macs. Follow-up work includes layered module dependency rules to stop circular dependencies, possibly adopting Needle for dependency injection, and splitting Android modules into API/implementation pairs for build parallelism.
- How We Built The Deals Tab in Swift UI
Etsy Code as Craft mediumAdeptEtsy rebuilt its mobile Updates tab as a new Deals tab in SwiftUI inside a modular Tuist module, which made preview builds nearly instant and let the team build modules from mock preview data about two weeks before the APIs were ready. The screen is a SwiftUI List of typed API modules decoded with a Decodable-based APIv3 layer, and nested `Previews` enums supply mock models at every level. To meet the Cyber Week deadline without rewriting legacy Objective-C code, navigation, favoriting and logging are handed back to the main target through custom `@Environment` action handlers. Legacy listing cards are injected as UIViewRepresentable view builders from the UIKit hosting controller.