Docs

Almanac: Weather App in SwiftUI

Setup guide for Almanac, a complete Weather App Xcode project in SwiftUI. Install, rename and theme version 1.1.0.

Almanac is a complete Weather App in SwiftUI: an Xcode project you rename and ship. 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. This guide takes you from download to a running, renamed app. It covers version 1.1.0. See the screens on its library page.

Requirements

  • Xcode 26 and an iOS 17.0 or later deployment target
  • Tuist 4 (brew install tuist)
  • An Apple Developer team for devices, App Groups and Sign in with Apple. The simulator runs without one.

Install

Download

Included with SwiftPieces Pro. Not signed in? The button takes you to sign in or create an account, then starts the download when you're back. Unzip the archive; it contains one folder, Almanac/.

Make it yours

cd Almanac
scripts/setup.sh --name YourApp --bundle-id com.you.yourapp --preset almanac-sol

The script rewrites the project configuration, renames the paywall product ids, renders the app icon in the chosen preset and runs tuist generate.

Run it

Open YourApp.xcworkspace, choose an iPhone simulator and run the YourApp scheme. The first launch loads sample data so every screen has content.

Screens and flows

Almanac ships 14 screens, joined by 4 flows. Play each flow step by step on the site:

  • First Run: onboarding, 14 steps. Location, units, places and warnings set the almanac up, then an account and Almanac Plus before the first issue of Today.
  • Read The Forecast: core journey, 8 steps. Scrub the next 24 hours on Today, read the warning, ten days and conditions, switch places, then play the radar.
  • Follow A Place: core journey, 8 steps. Unfollow a place, search for another, follow it and move it up the list, then open its forecast page.
  • Settings And Plan: profile and settings, 9 steps. Units, warnings and the theme in Settings, Almanac Plus from its row, then Start over back to first run.

Every screen is a SwiftUI view in the project. Search for its type to find the file.

ScreenSwiftUI viewWhere
LocationLocationPageFirst run
Pick A CityCityPageFirst run
UnitsUnitsPageFirst run
Places To FollowPlacesPageFirst run
WarningsAlertsPageFirst run
Sign InSignInViewAccount and subscription
Almanac PlusPaywallViewAccount and subscription
TodayTodayScreenTabs
RadarRadarScreenTabs
PlacesPlacesScreenTabs
City ForecastForecastPageViewDetails and sheets
SettingsAlmanacSettingsScreenProfile and settings
TemperatureSettingsPickerListProfile and settings
ThemeThemeSettingsViewProfile and settings

Rebrand options

OptionWhat it sets
--nameTarget, scheme and product name. Letters and digits.
--bundle-idThe bundle id. The widget, modules, tests and the App Group derive theirs from it.
--display-nameThe name under the icon. Copy that mentions the app reads it at runtime.
--teamYour Apple Developer team id.
--presetThe starting brand preset. Also re-renders the app icon.
--product-prefixApp Store Connect product id prefix. Defaults to the bundle id plus .pro.

The values live in Tuist/ProjectDescriptionHelpers/AppConfig.swift if you prefer to edit them by hand.

Theming

Almanac reads every color, type size, radius and animation from @Environment(\.spTheme). Its three presets are three different scheme families, so switching changes the whole look: ground, surfaces, color blocks, type and shape. People switch presets and appearance in Settings > Theme, and the widget follows.

PresetIdLookType
Pressalmanac-pressNewsprint bone, printing inks, hairline rules.Inter
Solalmanac-solSun-bleached sand, marigold and terracotta.Space Grotesk
Prismalmanac-prismCool white, luminous color fields and dot-matrix figures.SF Pro
  • Blocks: theme.color.tiles holds each family's solid block colors with the ink that reads on them. Use them for categories, charts and highlights, and keep the accent for the primary action.
  • Numbers and display type: theme.type.numeral(64) and theme.type.display(40) set any size in the family's style, scaling with Dynamic Type.
  • Backdrop: SPBrandBackdrop draws the family's motif (contours, scenery, shapes, blobs, rings, the Pearl haze, Confetti's sprinkles or Prism's luminous field) behind hero surfaces.
  • Liquid Glass: .spGlass uses glass on iOS 26, Material on iOS 17 and 18, and an opaque surface under Reduce Transparency.

To build your own brand, start from the preset closest to it in BrandPresets.swift, copy it, and change its colors; every role and block pairing should keep 4.5:1 contrast. For a quick start from hues, SPBrandConfiguration.custom(...) builds an accessible palette from three OKLCH hues.

Purchases and accounts

  • PurchaseStore handles StoreKit 2: products, purchase, restore and transaction updates. The scheme runs with Configuration/Products.storekit, so purchases work in the simulator before App Store Connect is set up.
  • Create the products in App Store Connect with the ids in the project's catalog (the product prefix plus .yearly and .monthly).
  • AccountStore signs in with Apple and keeps the account in the Keychain. People can also continue without an account.
  • Data lives in SwiftData inside the App Group, so the widget reads the same store. Replace the sample data by conforming your own type to the repository protocol.

Launch arguments

Debug builds accept these arguments for demos and screenshots. Release builds ignore them.

ArgumentEffect
-SPMockStoreLocal purchases with the same plans
-SPMockAccountA signed-in sample account
-SPSkipOnboardingOpen on the home screen
-SPResetOnboardingRun first launch again
-SPResetDataReseed the sample data
-SPTab followed by a tab idOpen a tab
-SPPresent paywallPresent the paywall
-SPPreset almanac-solStart with a preset
-SPAppearance darkForce light or dark

Changelog

1.1.0

2026-10-05

  • New Prism preset (almanac-prism) replaces Neon: cool white, seven vivid blocks, SF Pro display type and the temperature lit on a dot matrix in Today and the Conditions widget. The template no longer bundles Geist.

1.0.0

2026-09-18

  • Tuist project with feature modules (Onboarding, Today, Radar, Places, Settings) on a shared DesignSystem and the SkyKit domain module.
  • One-command setup: name, bundle id, team, product ids, brand preset and app icon.
  • Brand presets Press (default), Sol and Neon with Inter, Space Grotesk and Geist display type, switchable in Settings.
  • First run with a location step and a "not now" city picker, units with a live specimen, places to follow, severe weather warnings and a StoreKit 2 paywall with a .storekit configuration and a mock store for demos.
  • Today as a printed page: masthead, a giant tabular reading, the next 24 hours on a ruled tape with the sun or moon on its arc, warnings, a ten-day table of range bars on one scale and the day's details.
  • Radar as a dot matrix over a drawn coast, with a timeline, play, pinch to zoom, locate, legend blocks and a warnings ticker.
  • Places with search, reorder, swipe to unfollow and each city's forecast page.
  • Almanac Plus: radar every five minutes, a fifteen-day outlook and unlimited places.
  • Sample weather behind a ForecastRepository protocol and SwiftData places in an App Group.
  • Conditions (small) and Hourly (medium) widgets.
  • Light and dark mode, Dynamic Type through the accessibility sizes, VoiceOver labels and adjustable controls, and Reduce Motion.
  • Unit tests and a first-run UI test.