In a hybrid iOS app I worked on, the design system lived in Figma. Surface, text, accent, border, and state colors all had named tokens. Two questions: how do those tokens reach the app, and what stops the iOS side from drifting from the design system over time?

The answer was a generator. Designers defined colors in Figma. A small CLI pulled the token export, emitted an Xcode .xcassets catalogue with one named color set per token. The same generator emitted color tokens for Android, so both platforms referenced the same names backed by the same hex values.

What the asset catalogue does for free

Xcode’s asset catalogue lets each named color set hold variants for different appearances: light, dark, high contrast.

The app didn’t have dark mode at first. When the time came to add it, we didn’t sweep through every view controller. The tokens already supported the concept. The asset catalogue already supported the runtime switch. The migration was almost mechanical: add the dark variants to the Figma export, regenerate, turn the system-appearance toggle on, fix the handful of legacy hard-coded .whites in places that hadn’t yet been migrated to tokens. Ship.