Mobile Development 17 min read

Swift Adoption and Architecture Evolution at AcFun: From Objective‑C to SwiftUI and Combine

The article details how AcFun transitioned its iOS codebase from Objective‑C to Swift, describing Swift's origins, Apple’s strategic push, the company’s architectural evolution, mixed‑language challenges, performance gains, and the adoption of modern frameworks such as SwiftUI, Combine, and RxSwift.

Kuaishou Tech
Kuaishou Tech
Kuaishou Tech
Swift Adoption and Architecture Evolution at AcFun: From Objective‑C to SwiftUI and Combine

AcFun (referred to as "A Station") has fully embraced Swift as its primary iOS development language, replacing Objective‑C to achieve a more comfortable and efficient development experience.

The piece first explains why Apple created Swift, highlighting the limitations of Objective‑C and the desire for a safer, high‑performance language, and outlines Apple’s concrete actions such as deprecating new Objective‑C APIs, promoting Swift‑only SDKs, and introducing frameworks like SwiftUI, Combine, RealityKit, and CryptoKit.

It then describes AcFun’s own journey: a 2019 Swift feasibility study, subsequent training, mixed‑language infrastructure, and a shift toward module‑based architecture using LLVM Modules, achieving an 80% binary‑ization rate and a 60% build‑time reduction.

Statistical data shows Swift now accounts for about 40% of AcFun’s source files, reducing crash rates by 52% and improving release cadence, while the mixed Swift/Objective‑C codebase still requires bridging headers for legacy components.

The article reviews the evolution of Swift itself—from its first release through Swift 5.1 (introducing SwiftUI and Combine) to upcoming Swift 6 plans—emphasizing language stability, ABI, and new features like Result Builders.

Framework selection is discussed, comparing SwiftUI (with its declarative UI and Redux‑style data flow) to UIKit integration via UIHostingController, and contrasting Combine with RxSwift, noting that Combine offers back‑pressure handling not present in RxSwift.

AcFun’s open‑source contributions and library usage are listed (e.g., Protobuf, RxSwift, Cache, Observable), along with community resources for SwiftUI, Combine, and other Swift packages.

Finally, the article mentions the broader industry trend of Swift adoption in major Chinese apps and the recruitment appeal of Swift expertise within AcFun’s mobile team.

mobile developmentarchitectureiosSwiftSwiftUICombineRxSwift
Kuaishou Tech
Written by

Kuaishou Tech

Official Kuaishou tech account, providing real-time updates on the latest Kuaishou technology practices.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.