Template · Weather

Weather App SwiftUI Template

Almanac, a weather app set like a printed page: a complete Xcode project with an hour-by-hour forecast, a dot-matrix radar, saved places, alerts, widgets and three brand presets. 14 screens and 4 flows in Almanac, as a SwiftUI app template.

A weather app on four tabs. First run asks for location, units, places to follow and severe weather alerts, then offers Sign in with Apple, before a StoreKit 2 paywall for minute-by-minute radar. Today scrubs the next 24 hours on a ruled tape over a ten-day table; Radar plays the next two hours as a dot matrix; Places lists saved cities; Settings holds units, alerts and the subscription.

  • SwiftUI
  • iOS 17.0+
  • Xcode project 1.1.0
  • weather-app
14 Screens4 Flows
Get SwiftPieces Pro

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

01

Flows

Complete journeys through Almanac, 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

Location, units, places and warnings set the almanac up, then an account and Almanac Plus before the first issue of Today.

8 Screens14 Steps
Play the flow
  1. 01Location
  2. 02Allow Location
  3. 03Pick A City
  4. 04Units
  5. 05Places To Follow
  6. 06Follow Five
  7. 07Warnings
  8. 08Allow Notifications
  9. 09Sign In
  10. 10Sign In With Apple
  11. 11Almanac Plus
  12. 12Start The Trial
  13. 13Unlocked
  14. 14The First Issue

02 · Core Journey

Read The Forecast

Scrub the next 24 hours on Today, read the warning, ten days and conditions, switch places, then play the radar.

2 Screens8 Steps
Play the flow
  1. 01Today
  2. 02Scrub The Tape
  3. 03Ten Days
  4. 04Conditions
  5. 05Switch Places
  6. 06Radar
  7. 07Play
  8. 08Locate

03 · Core Journey

Follow A Place

Unfollow a place, search for another, follow it and move it up the list, then open its forecast page.

2 Screens8 Steps
Play the flow
  1. 01Places
  2. 02Unfollow
  3. 03Search
  4. 04Follow Edinburgh
  5. 05Reorder
  6. 06City Forecast
  7. 07Scrub London
  8. 08London's Ten Days

04 · Profile And Settings

Settings And Plan

Units, warnings and the theme in Settings, Almanac Plus from its row, then Start over back to first run.

5 Screens9 Steps
Play the flow
  1. 01Settings
  2. 02Temperature
  3. 03Warnings And Location
  4. 04Theme
  5. 05Upgrade To Plus
  6. 06Start Over
  7. 07Confirm
  8. 08Starting Over
  9. 09Location

02

Screens

Every screen in Almanac, 14 in all, each a SwiftUI view in the Xcode project. In Press, Sol and Prism, light and dark.

First run

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

  • Location

    The first page asks to set each day's forecast where you are, or to skip and pick a city.

    Built onForecast

  • Pick A City

    Without location, a ruled list of cities sets which one Today reports on.

  • Units

    Temperature and wind units, with a specimen reading that converts as you choose.

  • Places To Follow

    Suggested cities to follow with a tap, and search for any other.

  • Warnings

    Severe weather warnings for every followed place, set as a printed notice, and an optional morning briefing.

Account and subscription

Sign in, verification and the paywall.

  • Sign In

    An account to back up the places you follow, with Sign in with Apple or none at all.

  • Almanac Plus

    Almanac Plus, yearly with a seven-day trial or monthly: radar every five minutes, fifteen days and unlimited places.

    Built onPaywall

Tabs

Where the app opens, one screen per tab.

  • Today

    The day's forecast set as a printed page: scrub the next 24 hours on a ruled tape, then read the ten days and conditions.

    Built onForecast

  • Radar

    The next two hours of rain as a dot matrix over the coast, played frame by frame.

    Built onRadar

  • Places

    Followed cities with their local time, reading and today's range on one scale, with search, reorder and unfollow.

    Built onForecast

Details and sheets

What the tabs push and present.

  • City Forecast

    A followed city's own forecast page, pushed from Places under a compact heading.

    Built onForecast

Profile and settings

The account, preferences, the subscription and sign out.

  • Settings

    Almanac Plus, units, warnings, location and the look, with Start over back to first run.

    Built onSettings

  • Temperature

    A pushed single-choice list for the temperature unit, Celsius or Fahrenheit.

    Built onSettings

  • Theme

    Press, Sol and Prism, in light, dark or the system's 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.

04

What's included

SwiftUI source you own, built on Apple frameworks only.

  • The next 24 hours on a ruled tape you scrub
  • A ten-day table of range bars on one scale
  • A dot-matrix radar that plays the next two hours
  • Saved places with live readings, reorder and search
  • Conditions and Hourly widgets
  • Three presets: Press, Sol and Prism, with the temperature lit on a dot matrix

Includes

Forecast, Radar, Settings, Purchase, Paywall. Installed together, automatically.

Requires

In-App Purchase capability

05

Implementation notes

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

WeatherApp is one root view. On first launch it asks where to report on: your location, or a designed "not now" path that picks a city from a ruled list. Then it sets your units and 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 a floating ruled bar with four destinations. Today is the Forecast screen under a newspaper masthead: the hour under the indicator as a giant tabular figure, the next 24 hours on a tape of hairline ticks you scrub while the sun or moon travels its arc, and a ten-day table of range bars on one shared scale. Radar is the Radar screen's dot matrix playing the next two hours over a drawn coast. Places lists followed cities as ruled rows, with reorder, swipe to unfollow and each city's forecast page. Settings holds units, warnings, the subscription and "Start over" back to first run.

Adapting it

  • Forecasts: AlmanacSample draws believable sample weather from a few numbers per city. Conform a type to ForecastRepository (WeatherKit, or your provider's API) and pass it as forecasts.
  • Radar: the sample plays DotRadarSample.frames over its drawn coast. Map your provider's radar to [RadarFrame] grids and your coast to land polygons.
  • 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.
  • Location: add NSLocationWhenInUseUsageDescription to Info.plist, then reverse-geocode the fix in WeatherFirstRun.useLocation.
  • Theme: everything follows the theme you set on WeatherApp. Without a brand it wears Almanac Press; SPBrandTheme(.almanacSol) or .almanacPrism re-skin every page, and softer brands lift the ruled cells onto cards.

The Xcode project

The download is a complete project on Tuist: sample weather for thirty cities behind a ForecastRepository protocol, with hours eased from three-hourly readings, sunrise and sunset from latitude, UV, wind and warnings; SwiftData places in an App Group with search, reorder and unfollow; a full first run with units, places to follow, severe weather warnings and an account step with Sign in with Apple; Almanac Plus with radar every five minutes and a fifteen-day outlook; a warnings ticker and a morning briefing; Conditions and Hourly widgets; three presets; unit tests and a first-run UI test.

Notes

  • Not @main: put WeatherApp() in your own WindowGroup.
  • Enable the In-App Purchase capability before testing purchases.
  • Previews ship with the file: first run, home, and home in each Almanac preset.