Mobile Development 10 min read

Dynamic Development Mode ARK for iOS: Reducing Build Time and Improving Efficiency

The article introduces ARK, a dynamic development mode for iOS that replaces traditional CocoaPods‑Xcode workflows with a lightweight 2 MB repository and real‑time library conversion, dramatically cutting pod install and compile times, improving build success, and enabling fast, component‑focused development using ByteDance’s MBox tool.

ByteDance Dali Intelligent Technology Team
ByteDance Dali Intelligent Technology Team
ByteDance Dali Intelligent Technology Team
Dynamic Development Mode ARK for iOS: Reducing Build Time and Improving Efficiency

1. Background

iOS industry development typically uses a CocoaPods + Xcode + Git multi‑repository componentized model. While many optimizations have been applied, the current bottlenecks are:

Long pod install time because most tasks are shifted to CocoaPods.

Long compile time (around ten minutes) despite binary compilation.

Issues in large projects such as slow Xcode indexing, memory spikes, and long link times.

How to address these issues?

The root cause is the massive project scale. To break through, we stopped optimizing individual nodes of the traditional model and instead focused on "shrinking project size" by exploring a new dynamic development mode called ARK.

ARK is a full‑link dynamic development mode that provides baseline materials for offline development and, through real‑time dynamic library conversion, ensures local development only needs to download and compile the development repository.

2. Show Case

The local development flow of the dynamic mode is illustrated below. Using Douyin (TikTok) as an example, we explain how to perform a local development with ARK. Demonstration based on ByteDance's local development tool MBox .

2.1 Repository Download

Under ARK, local development no longer pulls the main repository; instead it uses an ARK repository that contains all configuration corresponding to the main repo. After a one‑time adaptation, no further maintenance is needed.

The ARK repository follows the principle of reducing code size: it only holds application configuration, no component code, and is about 2 MB, downloadable in roughly one second.

In MBox, the steps are simple: select the product, enable ARK mode, choose the development branch, and click Create to complete the download in seconds.

2.2 Develop Component

In traditional CocoaPods development you modify the Podfile, e.g., pod A, :path=>'./A' , and then develop locally. With MBox and ARK, you simply select the component and click Add to start local development.

ARK parses Podfile.lock and supports the Checkout From Commit feature, automatically pulling the required component versions based on dependency information, which improves convenience while maintaining compile success.

2.3 pod install

In the traditional model, pod install must parse dependencies, download them, create Pods.xcodeproj , and integrate the workspace—four steps where dependency parsing and downloading dominate the time.

In ARK, the Podfile contains no components, so dependency resolution and download are virtually zero. Only the selected components are built, dramatically reducing code size and integration time.

ARK ensures successful compilation, linking, and execution through a custom cocoapods-ark toolchain, whose details will be covered in future articles.

2.4 Component Compile & Debug

Open the generated xcworkspace in Xcode to develop and debug the full application. The project retains variable, function, and header navigation, but the reduced index and compile scope means Xcode hardly shows a loading state, even for large projects, and compile speed improves significantly. The toolchain also converts static libraries to dynamic ones, shortening link time.

2.5 View Full Source

ARK projects contain only the source of the developed components. To view the full source, ARK provides an asynchronous pod doc command. After execution and a project restart, the Document target shows other component sources.

Advantages of pod doc :

Supports async and sync execution without affecting local development.

Skips dependency resolution, fetching dependency info from the server and downloading source.

Uses xcodegen to generate the Document project asynchronously, greatly reducing pod install time.

Reuses the pod installer’s download and cache modules.

Supports unified repository authentication and automatically skips unauthorized component repos.

3. Benefits

Experience: The workflow matches the traditional mode, allowing a zero‑cost switch to the dynamic mode.

Tools: Optimizations made to the CocoaPods toolchain also apply within ARK.

Time: Traditional full‑link development can be kept around 20 minutes after optimizations, but ARK reduces the entire development cycle to under 5 minutes, providing a seamless experience.

Success Rate: Compilation success rates in large codebases are often below 50 %; ARK’s baseline and sandboxed toolchain significantly improve overall success.

Conclusion

ARK is already deployed across multiple ByteDance businesses. From early technical exploration to real‑world adoption, many challenges have been addressed, and further technical articles will be shared soon.

Further Reading

[1] ARK: https://github.com/kuperxu/KwaiTechnologyCommunication/blob/master/5.WWDC-ARK.pdf

[2] MBox: https://mp.weixin.qq.com/s/5_IlQPWnCug_f3SDrnImCw

Mobile DevelopmentiOSbuild optimizationCocoaPodsDynamic DevelopmentARK
ByteDance Dali Intelligent Technology Team
Written by

ByteDance Dali Intelligent Technology Team

Technical practice sharing from the ByteDance Dali Intelligent Technology Team

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.