Sitemap

Member-only story

SwiftUI’s Internal APIs: The Hidden Trap

Why you shouldn’t trust SwiftUI’s underscored or undocumented internals, no matter how tempting or useful they look.

7 min readJun 8, 2025
Image ChatGPT, because it’s really hard to find a stock image of a developer falling through a floor.

Spend enough time reading about SwiftUI and you’ll eventually trip over something like _VariadicView.

It’s not in the documentation. It’s not shown at WWDC. But it’s there, quietly inviting you to tap into the hidden power that Apple itself uses to build its most flexible views and layouts.

The promise is seductive: dynamic child views, runtime flexibility, workarounds for SwiftUI’s usual strictness.

And it will compile. It might even work.

But make no mistake… it won’t last.

SwiftUI’s underscored types are not undocumented gems waiting to be discovered. They’re implementation details, temporary scaffolding meant to be replaced or reworked whenever it suits Apple’s needs.

And if you build on them, you’re building on quicksand.

Why? Let’s take a look.

Using _VariadicView

I mentioned _VariadicView, so let’s continue with that as our example. A _VariadicView is an internal type SwiftUI uses to compose a dynamic set of child views at runtime.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (5)