Template · Commerce
Subscription App SwiftUI Template
Cadence, a subscription habit tracker: a complete Xcode project with onboarding, a StoreKit 2 paywall, SwiftData, widgets and three brand presets. 16 screens and 4 flows in Cadence, as a SwiftUI app template.
A complete subscription app. First run is three welcome pages, a reminders request, Sign in with Apple and a StoreKit 2 paywall; after that the app opens on a four-tab shell: Today, Habits, Insights and Settings. What's New, habit details and the editor, upgrading from Settings and signing out back to first run are all connected.
- SwiftUI
- iOS 17.0+
- Xcode project 1.0.0
- subscription-app
$199 once, every piece included. See how installing works · Sign in
01
Flows
Complete journeys through Cadence, 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
From the welcome pages through reminders, Sign in with Apple and the Pro trial to Today.
7 Screens12 Steps02 · Core Journey
Check In For The Day
Check habits off from Today and from a habit's page, then see how the month went in Insights.
4 Screens11 Steps03 · Core Journey
Start A Habit
Go from an empty list to a first habit and mark it done on its page.
3 Screens6 Steps04 · Profile And Settings
Profile And Settings
Upgrade from Settings, choose an appearance and a theme, export the history and sign out.
6 Screens11 Steps02
Screens
Every screen in Cadence, 16 in all, each a SwiftUI view in the Xcode project. In Candy, Studio and Graphic, light and dark.
First run
Welcome, permissions and the questions that set the app up.
- Small Things, Every Day
The first of three welcome pages: pick a few habits that matter, and Cadence keeps the schedule, the reminders and the record.
Built onWelcomeOnboarding
- Streaks That Forgive
The second welcome page: a streak freeze keeps a run alive through a missed day.
Built onWelcomeOnboarding
- See What's Working
The last welcome page promises weekly insights in plain language and ends with Get started.
Built onWelcomeOnboarding
- Reminders
Asks for notifications with three promises on blocks, then Allow reminders or Not now.
Built onOnboarding
Account and subscription
Sign in, verification and the paywall.
- Sign In
Signs in with Apple to back up habits, or continues without an account and keeps them on this iPhone.
- Cadence Pro
Offers Pro with four benefits, Yearly and Monthly side by side and a seven-day trial on Yearly.
Built onPaywall
Tabs
Where the app opens, one screen per tab.
- Today
Shows the day's progress as a giant count, this week as bars and the habits still due as blocks to check off.
- Habits
Lists every habit with its schedule, last seven days and streak, or the ghost state before the first one.
- Insights
Compares the week or month with the period before, names the strongest and hardest days and ranks each habit.
Details and sheets
What the tabs push and present.
- Habit Detail
One habit's streak, stats and history, where today is marked done and missed days are fixed.
Built onApp Shell
- New Habit
Names a habit and sets its symbol, days, reminder and note.
- What's New
The release's changes as a bento grid of blocks that open into their detail.
Built onWhat's New
Profile and settings
The account, preferences, the subscription and sign out.
- Settings
The account and plan, reminders, theme and appearance, data export, support and sign out.
- Appearance
Sets the app and its widget to follow the system, or stay light or dark.
Built onSettings
- Theme
Switches between Candy, Studio and Graphic, previewed on a sample card.
- Export History
Shares every check-in as a CSV spreadsheet.
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
Three welcome pages, a reminders request, Sign in with Apple and the StoreKit 2 paywall. Runs once, then records completion.
Tabs
Today, Habits, Insights and Settings on the App Shell. Habits shows a ghost state when the list is empty.
From the tabs
What's New opens from Today and Settings. Habit details push from Today and Habits; Settings reopens the paywall, sets the theme and signs out to first run.
04
What's included
SwiftUI source you own, built on Apple frameworks only.
- Onboarding with a real notifications request and Sign in with Apple, handing off to a StoreKit 2 paywall
- A four-tab shell with habit detail pushes and a ghost state for an empty list
- A What's New sheet for the 2.0 release
- Settings with reminders, appearance, subscription and sign out
- One root view,
SubscriptionApp, with your product ids and completion key as parameters
Includes
Onboarding, Welcome, Purchase, Paywall, App Shell, Lessons, Projects, What's New, Settings. Installed together, automatically.
Requires
In-App Purchase capability
In the Build Kit
Subscription Utility (brief). Your agent builds around this template in the same design.
05
Implementation notes
How it behaves, what it handles, and the decisions behind it.
SubscriptionApp is one root view. On first launch it shows the Onboarding screen: three welcome pages, a notifications request, then the Purchase screen's StoreKit 2 paywall as the handoff. Purchasing, restoring or closing the paywall finishes onboarding and records it under a completion key, so the root switches to the home on its own.
Home is the App Shell with five tabs: Today, Habits, Projects, Insights and Profile. Today presents What's New for the 2.0 release as a sheet. Projects starts from a ghost state. Profile pushes Settings, where Manage subscription reopens the paywall full screen and Sign out clears the completion key and returns the app to first run.
Adapting it
- 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 onboarding. - Completion key:
completionKeyis theUserDefaultskey the flow writes and the root reads. Change it to show onboarding to everyone again, for example after a redesign. - Sample data: onboarding copy lives in
OnboardingFlowScreenExample.pagesand.permission, the tabs inCadenceTab, projects inGhostStateBlockExample, release notes inBentoGridBlockExample, and the account and settings rows at the top ofSubscriptionApp.swift. - Theme: every screen reads the Design System. Set
.environment(\.spTheme, PaperTheme())or your own theme once onSubscriptionAppto re-skin the whole app.
Notes
- Not
@main: putSubscriptionApp()in your ownWindowGroup. - Enable the In-App Purchase capability before testing purchases.
- Three previews ship with the file: first run, home, and home in Paper dark.
06
Keep building
Pieces that work well next to this one.