DanceUI: ByteDance’s Shadow SwiftUI Stack for Old iPhones

A look at the framework that backports modern observation, bridges into custom rendering, and turns Apple’s version lock into an engineering problem.

9 min read • View on GitHub • More from bytedance

A wide editorial scene showing a polished mobile interface on one side and, behind it, a workshop of gears, ledgers, and macro tools assembling the same interface from parts. The image explains that DanceUI is not just a UI layer, but a hidden engine that reproduces a modern SwiftUI-like experience across older iOS versions.
DanceUI reads like SwiftUI on the outside, but underneath it looks more like infrastructure: state tracking, layout, and rendering rebuilt so older devices can keep up.
Key Takeaways

The cost of waiting for Apple

Apple’s UI stack advances on Apple’s schedule. That is fine until you need modern state semantics, consistent behavior, and older-device support in the same product. Then every new API becomes a trade-off, not a win.

DanceUI exists to break that trade-off. In the technical report, it reads like ByteDance’s answer to version lock: a SwiftUI-like experience that reaches back to iOS 13 while preserving control over the pieces Apple normally owns.

That is why this project matters. It is not another component library competing on syntax polish. It is a claim that the UI layer itself can be made portable, internal, and independent of Apple’s release cadence.

What DanceUI actually is

The codebase is split into a few telling parts: Sources/DanceUI for the public DSL, Modules/DanceUIObservation for the observation backport, and Modules/DanceUICompose for the rendering bridge. There is also an example app and a podspec that points at a broader internal ecosystem.

DanceUI’s stack is layered on purpose. The DSL stays familiar, but the observation and rendering layers are custom infrastructure underneath it.

The important point is what this structure implies. DanceUI is not just borrowing SwiftUI vocabulary. It is rebuilding the machinery that makes the vocabulary work.

struct ContentView: View {
    var body: some View {
        Text("Hello World")
    }
}

That kind of code is the tell. It looks ordinary, which is the point. Under the surface, the framework is trying to make ordinary SwiftUI-style code run on a much less forgiving compatibility base.

The surprising part is Observation

The deepest part of the report is the observation backport. Apple’s Observation framework only arrived much later, but DanceUI’s DanceUIObservation module appears to recreate the same user-facing behavior by combining a macro with a registrar that tracks what views read and what state mutates.

A close-up editorial scene of a property setter and getter linked to a mechanical registrar on a watchmaker’s bench. Small tags light up along a dependency chain as the state changes, showing how reads are tracked and mutations trigger invalidation. The image explains that observation is compile-time rewriting plus runtime dependency bookkeeping.
The hardest part is not rendering pixels. It is knowing exactly which view depends on which piece of state, then invalidating only the right body recomputations.

That matters because observation is the difference between a nice declarative API and a reliable UI system. If the framework can precisely track reads and mutations, it can redraw less, behave more predictably, and preserve the SwiftUI mental model without inheriting all of Apple’s timing constraints.

In other words, the macro is not a convenience. It is the mechanism that lets the source code stay simple while the runtime stays clever.

Rendering is not just UIKit in disguise

The rendering side, especially DanceUICompose, suggests the framework is not merely wrapping UIKit widgets and hoping for the best. It is building a bridge between the declarative layer and low-level drawing primitives, including text layout and canvas-style rendering.

That choice tells you a lot about the project’s ambitions. Once you own rendering, you can control performance, consistency, and platform quirks more directly than a thin wrapper ever could.

This is where the article stops being about API aesthetics and becomes about systems design. A wrapper can imitate syntax. A renderer can shape behavior.

Why ByteDance would build this

Native SwiftUIThin UIKit wrapperDanceUI
Elegant, modern, and Apple-controlledCompatible, but usually shallowCompatible and infrastructural
Bound to OS version gatesDepends on UIKit behavior underneathBackports newer semantics to older iOS
Updates arrive on Apple’s scheduleLimited control over state and renderingOwns observation, DSL, and rendering layers
Great for apps aligned with Apple’s roadmapUseful for quick migrationsUseful for large internal portfolios that need stability and control

This is the strategic read: ByteDance likely built DanceUI because control matters more than elegance at scale. If you can own the DSL, the state graph, and the renderer, you can move faster without waiting on OS releases or inheriting every platform inconsistency that comes with them.

That also explains the ecosystem shape. The podspec’s dependency hints, the modular structure, and the internal naming all point to a platform team mindset. The goal is not one app. The goal is repeatability across many apps.

DanceUI versus native SwiftUI

DimensionNative SwiftUIDanceUI
OS supportGated by Apple release cadenceBackported to older iOS versions
Developer feelFirst-party and idiomaticSwiftUI-like and familiar
ObservationApple-owned framework behaviorMacro plus registrar backport
Rendering controlBound to Apple’s stackCustom bridge and lower-level primitives
Strategic postureUse what Apple shipsOwn the substrate when consistency matters

So DanceUI is not a replacement for SwiftUI in the usual open-source sense. It is a parallel answer to the same problem, tuned for a company that wants the convenience of a modern declarative API without accepting the constraint of Apple’s timeline.

That is the real lesson for platform teams. Once your product depends on old-device support, fast iteration, and UI consistency across a large codebase, you stop asking whether a framework is pretty enough. You start asking whether you can own the whole chain from source code to pixels.