Collaborating with Engineers on Apple UI: Shared Libraries and Specs
26/11
0

Handing off a design to an engineer often feels like throwing a message in a bottle across the ocean. You send over a high-fidelity mockup, they build it, and somehow the spacing is off, the font weight looks wrong, or the interaction just doesn't feel right. This friction isn't about bad intentions; it's about translation errors between visual intent and code implementation. When you're working within the Apple Human Interface Guidelines (HIG), the stakes are higher because consistency is baked into the platform's DNA. If your app doesn't look like it belongs on iOS, users notice immediately.

The solution isn't more meetings. It's better artifacts. Specifically, shared libraries and precise specifications that act as a single source of truth for both designers and developers. This guide breaks down how to bridge that gap using modern tools and practices, ensuring your iOS Design translates perfectly into production code.

Why Standard Handoffs Fail on iOS

Traditional handoff methods-like exporting PNGs or even basic PDFs-fail because they are static representations of dynamic systems. iOS interfaces are fluid. They adapt to different screen sizes, accessibility settings, and dark mode toggles. A static image can't show you what happens when a user increases their text size by 30%. It can't tell you which SF Symbols icon variant was used or why the button has a specific corner radius.

Engineers building for SwiftUI need structural data, not just visual pixels. They need to know if a component is a standard system control or a custom view. If you don't specify this, they might reinvent the wheel, creating a custom button that behaves differently from every other button in the app. This leads to technical debt and inconsistent UX. The goal is to move from "here is a picture" to "here is the logic."

Building a Shared Library That Actually Works

A shared library in tools like Figma or Sketch is more than a collection of icons. It's a living document of your design system. For Apple platforms, this library must mirror the underlying code structure. Here’s how to set it up so engineers actually use it:

  • Mirror System Components: Don't just draw a toggle switch. Use the actual dimensions and states defined in the HIG. Label them clearly (e.g., "Toggle - On", "Toggle - Disabled"). This helps developers map them directly to `Toggle()` views in SwiftUI.
  • Define Tokens, Not Just Styles: Create color and typography tokens that match your engineering constants. Instead of "Blue #007AFF," name it "Primary Action Color." When the brand color changes, you update the token once, and the spec updates everywhere.
  • Include States and Variants: Every interactive element needs variants for default, pressed, disabled, and selected states. Developers hate guessing what the pressed state looks like. Show them.

When your library is structured correctly, it becomes a reference tool. An engineer can inspect a layer in Figma and see the exact padding values, font weights, and shadow effects. But inspection isn't enough. You need to explain the *why* behind the *what*.

Isometric view of shared design library flowing to app and code

Writing Specs Engineers Can Read

Most design specs are written for other designers. They talk about "visual harmony" and "breathing room." Engineers speak in terms of constraints, modifiers, and layout priorities. Your documentation needs to translate aesthetic choices into technical requirements.

For example, instead of saying "make the header sticky," specify "the header should remain pinned to the top safe area during scroll, with a background blur effect applied." In SwiftUI, this maps to `.toolbar(.hidden, for: .navigationBar)` combined with a `Material` background. By providing these clues, you reduce the back-and-forth questions.

Translation Guide: Design Terms to Engineering Concepts
Design Term Engineering Concept (SwiftUI/UIKit) Actionable Spec Detail
Padding / Spacing `.padding()` modifier / Constraints Specify fixed values (e.g., 16pt) vs. flexible spacers.
Corner Radius `cornerRadius` / `layer.cornerRadius` Use continuous corners (squircle) for iOS native feel.
Blur Effect `Material` / `UIVisualEffectView` Specify material type (regular, thick, thin).
Safe Area `safeAreaInsets` Note if content extends under status bar or home indicator.

This table isn't just a cheat sheet; it's a communication bridge. When you attach such translations to your design files, you empower engineers to make correct decisions without needing to ask you for clarification on every pixel.

Leveraging Apple-Specific Tools

While Figma dominates the design world, ignoring Apple's own ecosystem tools is a mistake. Xcode Previews allow developers to see live renders of their code. If you provide assets that work seamlessly here, you win big.

Start by exporting assets in vector formats where possible. SF Symbols are ideal because they scale infinitely and respect accessibility settings automatically. If you must export images, provide @1x, @2x, and @3x versions, but also consider using PDF vectors for complex illustrations. These integrate cleanly into asset catalogs in Xcode.

Another powerful tactic is using DesignKit plugins or similar bridges that convert Figma designs into Swift code snippets. While the generated code isn't always perfect, it provides a solid starting point. It handles the tedious parts-layout calculations and basic styling-so engineers can focus on logic and animation.

Team reviewing iOS app build against design specs on tablet

The Feedback Loop: Reviewing Builds

Collaboration doesn't end at handoff. The most critical phase is reviewing the implemented build. Don't wait until QA to check the UI. Schedule brief "design review" sessions with engineers after each sprint.

Use real devices. Simulators lie about performance and sometimes render fonts differently. Check your app on an iPhone SE (small screen) and an iPhone Pro Max (large screen). Look for edge cases: What happens when the text is long? Does the layout break in landscape mode? How does it look in Dark Mode?

Provide feedback visually. Take screenshots of the implemented app, overlay your original design, and highlight discrepancies. Be specific: "The vertical spacing between the title and subtitle is 8pt in the design, but appears to be 12pt in the build." Vague feedback like "it looks off" frustrates everyone. Specific, actionable feedback builds trust.

Common Pitfalls to Avoid

Even with great libraries and specs, things go wrong. Here are the most common traps teams fall into:

  • Ignoring Accessibility: Designers often forget that Dynamic Type can change text sizes drastically. If your layout relies on fixed heights, text will clip. Always test your designs with large text sizes enabled.
  • Over-Customizing: Resist the urge to create custom buttons for everything. Native controls perform better and feel more familiar to users. Only customize when necessary for brand differentiation.
  • Stale Documentation: If your spec says one thing and the code does another, people stop trusting the docs. Keep your shared library updated in real-time. Treat it like code-with version control and changelogs.

By focusing on clarity, consistency, and continuous feedback, you transform collaboration from a bottleneck into a competitive advantage. Your engineers get fewer bugs, your designers get accurate implementations, and your users get a polished experience.

Do I need separate libraries for iOS and Android?

Ideally, yes. While core colors and typography might be shared, platform-specific components (like navigation bars and tab bars) differ significantly between Material Design and Human Interface Guidelines. Maintaining separate libraries prevents cross-platform contamination and ensures each app feels native.

How do I handle dark mode in my design specs?

Define semantic color tokens rather than hard-coded hex values. For example, use "Background Primary" instead of "White." Then, define two sets of values for that token: one for light mode and one for dark mode. This allows engineers to swap themes easily without changing the underlying code structure.

What is the best way to share animations with engineers?

Static GIFs are often misleading because frame rates vary. Instead, use Lottie JSON files for complex animations, as they can be rendered natively. For simple transitions, provide detailed notes on duration, easing curves (e.g., ease-in-out), and trigger events. Video recordings with slow-motion playback can also help clarify timing.

Should I use Figma Dev Mode or third-party plugins?

Figma Dev Mode is excellent for inspecting properties and generating CSS/SwiftUI code snippets. However, third-party plugins like Anima or Locofy can offer deeper integration with specific frameworks. Evaluate based on your team's workflow-if you primarily use SwiftUI, Dev Mode's native support is usually sufficient and less prone to breaking updates.

How often should we update our shared library?

Update it continuously as new components are finalized. Do not batch updates monthly, as this leads to version conflicts. Treat the library as a dependency in your project management tool. If a component changes, notify the engineering lead immediately so they can adjust the corresponding code modules.