---
title: "The evolution of Facebook’s iOS app architecture"
description: "Facebook's iOS app grew over ten years into a C++/Objective-C++/Swift codebase built around in-house abstractions, dynamically loaded libraries, and Buck-driven code generation."
url: "https://swe.quest/articles/the-evolution-of-facebook-s-ios-app-architecture-399dd453da436a48"
canonical: "https://engineering.fb.com/2023/02/06/ios/facebook-ios-app-architecture/"
source: "Meta Engineering"
published: "2023-02-06"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["mobile","build-systems","swift","c-cpp","performance"]
---

# The evolution of Facebook’s iOS app architecture

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2023-02-06, 12 min read, Case study. Original: [https://engineering.fb.com/2023/02/06/ios/facebook-ios-app-architecture/](https://engineering.fb.com/2023/02/06/ios/facebook-ios-app-architecture/)

## Summary

Facebook's iOS app grew over ten years into a C++/Objective-C++/Swift codebase built around in-house abstractions, dynamically loaded libraries, and Buck-driven code generation. Mutable Core Data models and MVC's bidirectional data flow led to the React-inspired ComponentKit, which brought a 50% performance gain. Startup times of nearly 30 seconds drove product code into lazily loaded dylibs, whose runtime failures were later turned into build-time errors by a plugin system generated from Buck dependency-graph queries. The recurring tradeoff is user experience and reliability against idiomatic iOS development, with the Swift-era language guidance of keeping C++ out of product-facing APIs giving developer efficiency more weight.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Swift](https://swe.quest/tags/swift.md) (Languages)
- [C & C++](https://swe.quest/tags/c-cpp.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- iOS app development
- Objective-C and Swift basics ([easy posts on Swift](https://swe.quest/tags/swift.md?difficulty=easy))
- dynamic linking

## Keywords

Facebook for iOS, ComponentKit, Buck, dylib, Core Data, SwiftUI, Objective-C++

## Related posts

- [Stabilize, Modularize, Modernize: Scaling Slack’s Mobile Codebases](https://swe.quest/articles/stabilize-modularize-modernize-scaling-slack-s-mobile-codebases-6744c42390a79288.md): Slack Engineering · 2022-01-12 · Easy · 14 min read · Mobile, Refactoring & migrations, Swift, Java & JVM, Developer productivity
  Slack chose to refactor its iOS and Android codebases in place through Project Duplo, a cross-platform effort in three phases: Stabilization, Modularization and Modernization.
- [How we rebuilt the Shopify app in 12 weeks](https://swe.quest/articles/how-we-rebuilt-the-shopify-app-in-12-weeks-08ae147088c9e21e.md): Shopify Engineering · 2026-11-10 · Medium · 15 min read · AI for coding, Mobile, Refactoring & migrations, Developer productivity, Code review
  Thirty 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.
- [Migrating Shop app from React Native to native](https://swe.quest/articles/migrating-shop-app-from-react-native-to-native-d251eff5b6600925.md): Shopify Engineering · 2026-09-10 · Medium · 6 min read · Mobile, React, AI for coding, Refactoring & migrations, Performance engineering
  Shopify rebuilt the Shop app from React Native into native Swift/SwiftUI and Kotlin/Jetpack Compose in 12 weeks, with coding agents porting features using the existing React Native app as a reference.
- [Scaling Slack’s Mobile Codebases: Modernization](https://swe.quest/articles/scaling-slack-s-mobile-codebases-modernization-950b9c539d5b5770.md): Slack Engineering · 2022-05-04 · Medium · 12 min read · Mobile, Refactoring & migrations, Swift, Java & JVM, Build systems
  Slack'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.
- [How we build SwiftUI features in the Medium application](https://swe.quest/articles/how-we-build-swiftui-features-in-the-medium-application-6bea0243c28426a7.md): Medium Engineering · 2021-06-08 · Medium · 9 min read · Swift, Mobile, Refactoring & migrations, Build systems, GraphQL
  Medium'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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
