---
title: "How We Built The Deals Tab in Swift UI"
description: "Etsy rebuilt its mobile Updates tab as a new Deals tab in SwiftUI inside a modular Tuist module, which made preview builds nearly instant and let the team build modules from mock preview data about two weeks before the APIs were ready."
url: "https://swe.quest/articles/how-we-built-the-deals-tab-in-swift-ui-81d29cc7e9699bbd"
canonical: "https://www.etsy.com/codeascraft/how-we-built-the-deals-tab-in-swift-ui"
source: "Etsy Code as Craft"
published: "2024-03-05"
difficulty: "medium"
kind: "Case study"
reading_minutes: 13
tags: ["swift","mobile","refactoring","build-systems","developer-productivity"]
---

# How We Built The Deals Tab in Swift UI

A post on [Etsy Code as Craft](https://swe.quest/sources/etsy.md), published 2024-03-05, 13 min read, Case study. Original: [https://www.etsy.com/codeascraft/how-we-built-the-deals-tab-in-swift-ui](https://www.etsy.com/codeascraft/how-we-built-the-deals-tab-in-swift-ui)

## Summary

Etsy rebuilt its mobile Updates tab as a new Deals tab in SwiftUI inside a modular Tuist module, which made preview builds nearly instant and let the team build modules from mock preview data about two weeks before the APIs were ready. The screen is a SwiftUI List of typed API modules decoded with a Decodable-based APIv3 layer, and nested \`Previews\` enums supply mock models at every level. To meet the Cyber Week deadline without rewriting legacy Objective-C code, navigation, favoriting and logging are handed back to the main target through custom \`@Environment\` action handlers. Legacy listing cards are injected as UIViewRepresentable view builders from the UIKit hosting controller.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Swift](https://swe.quest/tags/swift.md) (Languages)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- SwiftUI basics
- UIKit view controllers
- Swift Codable/Decodable ([easy posts on Swift](https://swe.quest/tags/swift.md?difficulty=easy))

## Keywords

SwiftUI, Tuist, UIKit, UIHostingController, Objective-C, Etsy

## Related posts

- [How we build SwiftUI features in the Medium application](https://swe.quest/articles/how-we-build-swiftui-features-in-the-medium-application-6bea0243c28426a7.md): Medium Engineering · 2021-06-08 · Medium · 9 min read · Swift, Mobile, Refactoring & migrations, Build systems, GraphQL
  Medium's iOS team builds new iOS 13+ features in SwiftUI and Combine by splitting a monolithic, partly Objective-C codebase into Swift packages: ApolloModel for generated GraphQL models, SharedUI components, per-feature UI packages, and planned LiveService/FakeService packages.
- [Lessons From Building iOS Widgets](https://swe.quest/articles/lessons-from-building-ios-widgets-87bd1407ab4fa628.md): Shopify Engineering · 2022-09-22 · Medium · 23 min read · Mobile, Swift, Caching, Product engineering
  Shopify rebuilt its iOS analytics widgets natively in SwiftUI rather than React Native, because app extensions have tight memory limits, WidgetKit serializes SwiftUI view hierarchies, and React Native had no official widget support.
- [Challenges of mixed SwiftUI and UIKit codebases in iOS Apps](https://swe.quest/articles/challenges-of-mixed-swiftui-and-uikit-codebases-in-ios-apps-2b630ad5ea3f4d4c.md): Medium Engineering · 2024-07-01 · Medium · 4 min read · Mobile, Swift, Refactoring & migrations
  Mixing SwiftUI into Medium's 2013-era UIKit iOS app brings recurring friction: sizing SwiftUI views hosted in UIHostingController as table/collection cells, mismatched scroll APIs (offset sign differs), and duplicated components like PostPreview implemented in both frameworks.
- [Native is now the future of mobile at Shopify](https://swe.quest/articles/native-is-now-the-future-of-mobile-at-shopify-4bc17172ea398962.md): Shopify Engineering · 2026-09-10 · Easy · 10 min read · Mobile, AI for coding, React, Refactoring & migrations, AI agents
  Shopify is moving its mobile apps from React Native back to native Swift and Kotlin because coding agents have cut the cost of building and keeping features in parity across two platforms, while native still gives closer access to platform capabilities and first-party tooling.
- [How we rebuilt the Shopify app in 12 weeks](https://swe.quest/articles/how-we-rebuilt-the-shopify-app-in-12-weeks-08ae147088c9e21e.md): Shopify Engineering · 2026-11-10 · Medium · 15 min read · AI for coding, Mobile, Refactoring & migrations, Developer productivity, Code review
  Thirty engineers rebuilt the 300+ screen Shopify mobile app from React Native to native Swift and Kotlin in 12 weeks, with agents writing most of the code.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
