Template · Home
Smart Home App SwiftUI Template
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. 18 screens and 4 flows in Maison, as a SwiftUI app template.
A smart home app built around a radial hub. First run names the home, picks its rooms, invites the household and asks for door alerts, then offers an account with Sign in with Apple 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.
- SwiftUI
- iOS 17.0+
- Xcode project 1.0.0
- home-app
$199 once, every piece included. See how installing works · Sign in
01
Flows
Complete journeys through Maison, from first launch to sign out, screen by screen. Open one to play it, or choose any screen to start there.
The first 3 steps of every flow are open. Pro opens every screen of every template, live in each style, and the SwiftUI to build them.
01 · Onboarding
First Run
Name the home, pick its rooms, invite the household, allow alerts, sign in and start Maison Plus, then land on the hub.
7 Screens13 Steps02 · Core Journey
Control The Home
Switch a device on the hub, hold one for its controls, then speak and type commands and check the cameras.
4 Screens10 Steps03 · Core Journey
Scenes, Climate And Energy
Run and edit a scene, switch a room off, then read the week's energy and lower the evening heating it points to.
5 Screens13 Steps04 · Profile And Settings
Household And Settings
Open the household from the avatars, invite someone, change the theme, upgrade to Plus and leave the home.
6 Screens10 Steps02
Screens
Every screen in Maison, 18 in all, each a SwiftUI view in the Xcode project. In Velvet, Frost and Studio, light and dark.
First run
Welcome, permissions and the questions that set the app up.
- Name The Home
Give the home a name and it appears on the centre disc of a small hub.
Built onHome
- Pick The Rooms
Choose the home's rooms as chips, and each one deals onto the hub's ring as a block.
Built onHome
- Invite The Household
Invite the people who live there, and each one invited takes a place on the ring.
Built onHome
- Allow Alerts
Turn on notifications for doors, camera motion and leak or smoke sensors.
Built onHome
Account and subscription
Sign in, verification and the paywall.
- Sign In
Sign in with Apple to back up the home, or continue without an account.
- Maison Plus
Start a seven-day free trial of Maison Plus, yearly or monthly.
Tabs
Where the app opens, one screen per tab.
- Home
Switch the devices of the room at the centre of a radial hub, and hold one for its controls.
Built onHome
- Climate
Turn the thermostat dial in half degrees, pick a mode and adjust today's schedule.
Built onClimate
- Rooms
Run a scene in one tap, or open a room from its tile.
- Energy
See the week's use by day and the devices that used most, with a tip to use less.
Details and sheets
What the tabs push and present.
- Device Controls
Set a device's brightness, volume or position, hold to unlock a door, or switch it.
- Type A Command
Type what the home should do, or tap a suggestion drawn from it.
- Cameras
Watch each camera live, with camera history on Maison Plus.
- Room
Read a room's temperature and humidity and switch every device in it.
- Edit Scene
Choose what each device does when a scene runs, room by room.
03
Built from the library
The library screens this template wires together, in the order someone meets them. Each one installs on its own too.
First run
Name the home, pick rooms, invite the household and allow door alerts, then an account with Sign in with Apple (or none) and the StoreKit 2 paywall. Runs once, then records completion.
Tabs
Home, Climate, Rooms and Energy on a floating dock. Home is the radial hub; Climate is the dial.
From the tabs
Scenes and room detail push from Rooms; household and settings open from the avatars.
04
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
05
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:
MaisonSampleinHomeApp.swiftis the sample home behindHomeRepository. Conform one type with your device client (HomeKit, Matter or your own cloud): return rooms with up to eightHubDevices each and send changes insave(_:). - Commands and voice:
MaisonShell.run(_:)matches a few phrases against the home, andspeak()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.maisonStudiore-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, then an account step with Sign in with Apple (or continue without an account) before the paywall; 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: putHomeApp()in your ownWindowGroup. - Enable the In-App Purchase capability before testing purchases.
- Voice needs
NSMicrophoneUsageDescriptionandNSSpeechRecognitionUsageDescriptiononce you connect real speech recognition. - Previews ship with the file: first run, home, and home in each Maison preset.
06
Keep building
Pieces that work well next to this one.