Swift PiecesPro
  • Library
    Screens48Finished, designed screens for real apps.Templates10Complete apps built from the screens.Build Kit24Styles, briefs and recipes for your coding agentEverything58The whole library, with search
  • Docs
  • Pro

Library

  • Screens48
  • Templates10
  • Build Kit24
  • Everything58
  • Docs
  • Pro
  • Account
Get Swift Pieces ProFree library ↗
Swift PiecesPro

Production-ready SwiftUI screens and app templates for iOS. The pieces to build the whole app.

Library

  • Screens
  • Templates
  • Build Kit
  • Everything

Product

  • Pro
  • Your account
  • Sign in

Resources

  • Docs
  • CLI
  • MCP and agents
  • Free library

Social

  • X / Twitter
  • GitHub

SWIFTPIECES PRO

© 2026 Swift Pieces. One payment, lifetime access, per-developer commercial license.

Curated withby Saivion

LibraryTemplatesSmart Home App

Template · Home

Smart Home App

Maison, a smart home app: a complete Xcode project with a radial device hub, climate control, rooms and scenes, energy, widgets and three brand presets.

A smart home app built around a radial hub. First run names the home, picks its rooms and invites the household before a StoreKit 2 paywall. Home puts the room at the centre with its devices in a ring; Climate is the thermostat dial; Rooms holds scenes and every device; Energy shows the week's use; household members open settings.

SwiftUIiOS 17.0+Xcode project 1.0.0home-app

Get Swift Pieces Pro

$199 once, every piece included. See how installing works · Sign in

01

What's inside

The screens this template wires together, in the order someone meets them.

First run

Name the home, pick rooms, invite the household, then the StoreKit 2 paywall. Runs once, then records completion.

Screen · Commerce

Purchase

A complete StoreKit 2 purchase: plans load, the purchase runs, success lands, the app unlocks.

Tabs

Home, Climate, Rooms and Energy on a floating dock. Home is the radial hub; Climate is the dial.

Screen · Home

Home

A room at the centre, its devices in a ring around it: tap to toggle, swipe to change rooms.

Screen · Home

Climate

A thermostat knob you turn around a ring of ticks, with modes and the day's schedule.

From the tabs

Scenes and room detail push from Rooms; household and settings open from the avatars.

Screen · Account

Settings

A settings home with a collapsing profile header, grouped rows, toggles and sign out.

02

What's included

SwiftUI source you own, built on Apple frameworks only.

  • A radial hub of devices around the room, with tap to switch and hold for controls
  • A thermostat dial with modes and a day schedule
  • Rooms and scenes, with one-tap scenes
  • Energy use by day and by device
  • Scene and Climate widgets with buttons that work without opening the app
  • Three presets: Velvet, Frost and Studio

Includes

Home, Climate, Settings, Purchase, Paywall. Installed together, automatically.

Requires

In-App Purchase capability

03

Implementation notes

How it behaves, what it handles, and the decisions behind it.

HomeApp is one root view. On first launch it asks for the home's name on an input pill and its rooms as block chips, then hands off to the Purchase screen's StoreKit 2 paywall. Closing, purchasing or restoring finishes first run and records it under a completion key, so the root switches to the app on its own.

The app sits under Maison's dock: a keyboard button, a wide accent capsule with a dot matrix holding the four destinations, and a cameras button. The destination you're on is a solid pill on the capsule; on Home that pill is the voice button, and the dots ripple while it listens. Home is the Home screen's DeviceHub: the room at the centre, its devices in a ring of blocks, tap to switch, swipe the centre to change rooms. Climate is the Climate screen's ClimateDial with modes and today's schedule. Rooms holds one-tap scenes and a tile for every room. Energy shows the week's use as columns of capsules and the devices that used most. The household's avatars, top right, open Settings.

Adapting it

  • Devices: MaisonSample in HomeApp.swift is the sample home behind HomeRepository. Conform one type with your device client (HomeKit, Matter or your own cloud): return rooms with up to eight HubDevices each and send changes in save(_:).
  • Commands and voice: MaisonShell.run(_:) matches a few phrases against the home, and speak() stands in for speech recognition. Replace both with your assistant.
  • Products: pass your App Store Connect ids as productIDs. Until they exist, the paywall shows its designed "plans didn't load" state and its close button still finishes first run.
  • Theme: everything follows the theme you set on HomeApp. Without a brand it wears Maison Velvet; SPBrandTheme(.maisonFrost) or .maisonStudio re-skin every destination, including the hub, the dial and the room tiles.

The Xcode project

The download is a complete project on Tuist: the home as one JSON document in an App Group behind HomeRepository; a first run on a hub that fills in as you name the home, pick rooms, invite the household and allow door alerts; device controls with a brightness slider and hold to unlock; a command sheet and a pretend voice turn that run through a tested command matcher; room detail, a scene editor and Maison Plus gating for automations and camera history; household invitations and settings; Scenes and Climate widgets with buttons that run a scene or nudge the thermostat without opening the app; three presets; unit tests and a first-run UI test.

Notes

  • Not @main: put HomeApp() in your own WindowGroup.
  • Enable the In-App Purchase capability before testing purchases.
  • Voice needs NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription once you connect real speech recognition.
  • Previews ship with the file: first run, home, and home in each Maison preset.

04

Keep building

Pieces that work well next to this one.

Screen · Home

Home

A room at the centre, its devices in a ring around it: tap to toggle, swipe to change rooms.

Screen · Home

Climate

A thermostat knob you turn around a ring of ticks, with modes and the day's schedule.

Template · Productivity

Productivity App

Margin, a workday app: a complete Xcode project with an agenda, focus sessions, notes, insights, widgets and three brand presets.