Template · Health

Fitness App SwiftUI Template

Pulse, a training app with rhythm: a complete Xcode project with a weekly plan, full-screen interval sessions, progress, widgets and three brand presets. 18 screens and 4 flows in Pulse, as a SwiftUI app template.

A training app on four tabs. First run asks what you train for, how much you train, the days you train and how long you have, then draws your week, offers a training-day reminder and an account with Sign in with Apple before a StoreKit 2 paywall. Today shows the week as its sessions and the day's session as a block you start; Start runs it full screen in the color of each phase and ends on a summary you rate; Timer builds your own intervals; Progress charts your load, personal bests and training split; Profile holds your streak, training days, sounds, haptics, the subscription and sign out.

  • SwiftUI
  • iOS 17.0+
  • Xcode project 1.0.0
  • fitness-app
18 Screens4 Flows
Get SwiftPieces Pro

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

01

Flows

Complete journeys through Pulse, 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 through your goals, days and week to an account, Pulse Plus and Today.

9 Screens14 Steps
Play the flow
  1. 01Welcome
  2. 02What You Train For
  3. 03How Much You Train
  4. 04Days And Length
  5. 05Building Your Week
  6. 06Your Week Is Ready
  7. 07Reminders
  8. 08Allow Reminders
  9. 09Sign In
  10. 10Sign In With Apple
  11. 11Pulse Plus
  12. 12Start The Free Trial
  13. 13Unlocked
  14. 14Today

02 · Core Journey

Train Today's Session

Start Thursday's Engine Intervals, run it set by set, rate it and watch it land in Progress.

4 Screens10 Steps
Play the flow
  1. 01Today
  2. 02Start
  3. 03Get Ready
  4. 04Work
  5. 05Rest
  6. 06Mid-session
  7. 07How Hard Was It
  8. 08Save Session
  9. 09Done
  10. 10Progress

03 · Core Journey

Build Your Own Intervals

Edit the Custom format on Timer, keep it with Pulse Plus and run it full screen.

3 Screens7 Steps
Play the flow
  1. 01Timer
  2. 02Custom
  3. 03Two More Rounds
  4. 04Saved
  5. 05Round 3 Of 8
  6. 06Summary
  7. 07Back On Timer

04 · Profile And Settings

Profile And Settings

From your streak and settings through training days, goals, tones, the theme and Plus to signing out.

6 Screens10 Steps
Play the flow
  1. 01Profile
  2. 02Training Days
  3. 03Session Length
  4. 04Goals
  5. 05Sounds And Haptics
  6. 06Theme
  7. 07Pulse Plus
  8. 08Sign Out
  9. 09Signing Out
  10. 10Back To The Start

02

Screens

Every screen in Pulse, 18 in all, each a SwiftUI view in the Xcode project. In Pearl, Neon and Graphic, light and dark.

First run

Welcome, permissions and the questions that set the app up.

  • Welcome

    One session's rhythm rises like a pulse over the promise of a week planned around you.

  • What You Train For

    Pick any of four goals, each on its own cover-art block.

  • How Much You Train

    Choose how much you train on level bars, which suggests how long your sessions run.

  • Days And Length

    Tap the weekdays you train and how long a session can be.

  • Your Week

    Pulse draws your week capsule by capsule, then sums it up in sessions, average minutes and weeks.

  • Reminders

    Preview the training-day reminder and allow it, or skip it for now.

Account and subscription

Sign in, verification and the paywall.

  • Sign In

    Sign in with Apple to back up your training, or continue without an account.

  • Pulse Plus

    Start Pulse Plus with a week free for saved formats, a year of progress and every theme.

    Built onPaywallPurchase

Tabs

Where the app opens, one screen per tab.

  • Today

    See the program's week as capsules and start the day's session from its block.

    Built onPlan

  • Timer

    Pick an interval format, edit its rounds, work and rest, keep the edit with Plus and start it.

    Built onIntervals

  • Progress

    Follow the week's time and load on a curve you scrub, your personal bests and where the time went.

    Built onProgress

Details and sheets

What the tabs push and present.

  • Session

    Train set by set, full screen in the color of each phase, with the whole session as a strip along the foot.

    Built onIntervals

  • Summary

    Rate how hard the session was on a ten-step track, then save it to your week.

    Built onIntervals

Profile and settings

The account, preferences, the subscription and sign out.

  • Profile

    Your place in the program and your streak sit over Settings, from Pulse Plus to sign out.

    Built onSettings

  • Training Days

    Switch the days you train; the program deals its sessions across them.

    Built onSettings

  • Session Length

    Pick 20, 30, 45 or 60 minutes, and every session is fitted to it.

    Built onSettings

  • Goals

    Turn first run's goals on and off, each in its own color.

    Built onSettings

  • Theme

    Choose Pearl, Neon or Graphic and the appearance, previewed on a sample card.

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

What you train for, how much you train, your training days and session length, then your week drawn, the training-day reminder, an account with Sign in with Apple (or none) and the StoreKit 2 paywall. Runs once, then records completion.

Tabs

Today, Timer, Progress and Profile on the native tab bar. Today is the Plan; Timer is Intervals; Progress is the load curve and your bests; Profile is your streak over Settings.

From the tabs

Start runs the day's session as a full-screen interval session and ends on a summary you rate.

04

What's included

SwiftUI source you own, built on Apple frameworks only.

  • A weekly plan drawn as its sessions, with the day's session as its rhythm
  • Every session full screen in the color of each phase, with haptics and count-in tones
  • A summary you rate, with top sets that become personal bests
  • A load curve you scrub, personal bests and your training split
  • An eight-week program fitted to your days and session length
  • Today and Week widgets
  • Three presets: Pearl, Neon and Graphic

Includes

Plan, Intervals, Progress, Settings, Purchase, Paywall. Installed together, automatically.

Requires

In-App Purchase capability

In the Build Kit

Health and Fitness (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.

FitnessApp is one root view. On first launch it runs Pulse's own first run: a welcome where one session's rhythm strip rises like a pulse, what you train for picked from four cover-art blocks, how much you train on rows of level bars, your training days and session length, your week drawn capsule by capsule, then the Purchase screen's StoreKit 2 paywall. Closing, purchasing or restoring finishes onboarding and records it under a completion key, so the root switches to the home on its own.

The home is SwiftUI's own TabView with four tabs and no search: Today, Timer, Progress and Profile. Today is the Plan screen: the program and your week in it as seven capsules sized by minutes, the day's session as a block with its rhythm strip and Start, and the moves on a numbered rail. Start runs the session on the Intervals screen's full-screen session, every set a work phase filling the screen in the session's color and every rest in its own, with haptics and optional count-in tones. It ends on a summary: the time, moves and estimated energy as light numerals and a ten-step track for how hard it was. Save fills the day's capsule and feeds Progress and the streak. Timer is the Intervals builder with your edits kept. Progress is the Progress screen: the last seven days, thirty days or year as totals, a load curve you scrub, personal bests and where the time went. Profile puts your week in the program and the streak over Settings, with start over back 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.
  • Your program: the sessions, their moves and the weekly order come from PulseSample at the top of FitnessApp.swift. A TrainingSession is moves with sets, work and rest, and it becomes the interval plan it runs, so a new program needs no timer code. PulseModel.session(on:) decides which session falls on which day.
  • History: PulseModel keeps finished sessions as PulseLog in memory and draws the week, the streak and the three periods from them. Persist the logs, and write each session to HealthKit in record(_:run:effort:).
  • Personal bests: PulseSample.bests are fixed. Log top sets on the summary to work out your own.
  • Plus: saving an edited interval format and the year on Progress open the paywall until Plus is unlocked; move or remove those gates in PulseHome.
  • Theme: everything follows the theme you set on FitnessApp. Without a brand it wears Pulse Pearl; SPBrandTheme(.pulseNeon) or .pulseGraphic re-skin every tab, including the session's fields, the heat behind the numerals and the cover art.

The Xcode project

The download is a complete project on Tuist: a first run that also asks for an account, with Sign in with Apple or none, right before the paywall; SwiftData history behind a repository protocol; Groundwork, an eight-week program in four phases with sixteen sessions and forty-five moves, fitted to the days and length you choose; six weeks of sample training with personal bests; top sets on the summary that become new bests; saved interval formats; training-day reminders; an Apple Health switch to connect; the Neon and Graphic themes with Pulse Plus; Today and Week widgets with pulse:// links; three presets; unit tests for the interval clock, sessions, the training math and the store, and a first-run UI test.

Notes

  • Not @main: put FitnessApp() in your own WindowGroup.
  • Enable the In-App Purchase capability before testing purchases. Writing workouts to Apple Health needs the HealthKit capability and usage strings.
  • Training weeks run Monday to Sunday, like the program, whatever the region's first weekday.
  • Energy is an estimate from time, work and effort, for motivation rather than measurement. Pulse's program is sample content for general fitness, not medical advice.
  • Previews ship with the file: first run, home, and home in each Pulse preset.