Swift PiecesPro
  • Library
    Screens48Finished, designed screens for real apps.Templates10Complete apps built from the screens.Build Kit24Styles, briefs and recipes for your coding agentEverything58The whole library, with search
  • Docs
  • Pro

Library

  • Screens48
  • Templates10
  • Build Kit24
  • Everything58
  • Docs
  • Pro
  • Account
Get Swift Pieces ProFree library ↗
Swift PiecesPro

Production-ready SwiftUI screens and app templates for iOS. The pieces to build the whole app.

Library

  • Screens
  • Templates
  • Build Kit
  • Everything

Product

  • Pro
  • Your account
  • Sign in

Resources

  • Docs
  • CLI
  • MCP and agents
  • Free library

Social

  • X / Twitter
  • GitHub

SWIFTPIECES PRO

© 2026 Swift Pieces. One payment, lifetime access, per-developer commercial license.

Curated withby Saivion

LibraryTemplatesMeal Planner

Template · Food

Meal Planner

Sprig, a meal planning app: a complete Xcode project with recipes that fit your pantry, a week plan, a grocery list, nutrition stats, cook mode, widgets and three brand presets.

A meal planning app on four tabs. First run asks about diet, allergies and household size before a StoreKit 2 paywall. For You ranks drawn recipe collections by what you need; Plan lays out the week and builds the grocery list; Pantry tracks what you have and what expires; Progress shows the week's nutrition in bubbles.

SwiftUIiOS 17.0+Xcode project 1.0.0meal-app

Get Swift Pieces Pro

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

01

What's inside

The screens this template wires together, in the order someone meets them.

First run

Diet, allergies, household size and goals, then the StoreKit 2 paywall. Runs once, then records completion.

Screen · Commerce

Purchase

A complete StoreKit 2 purchase: plans load, the purchase runs, success lands, the app unlocks.

Tabs

For You, Plan, Pantry and Progress on a floating bar. For You is the Recipes grid; Progress is Nutrition.

Screen · Food

Recipes

Drawn category tiles that re-rank with a spring as you pick what you need.

Screen · Food

Nutrition

A week in packed bubbles you tap to focus, with a progress figure and capsule bars.

From the tabs

Recipes push their detail and a step-by-step cook mode with timers; settings open from the avatar.

Screen · Account

Settings

A settings home with a collapsing profile header, grouped rows, toggles and sign out.

02

What's included

SwiftUI source you own, built on Apple frameworks only.

  • Drawn recipe collections that re-rank by what you need
  • A week plan that builds the grocery list
  • A pantry with expiry dates and check-offs
  • Nutrition in packed bubbles with a weekly goal figure
  • Cook mode with step timers that keeps the screen awake
  • Three presets: Press, Sol and Candy

Includes

Recipes, Nutrition, Settings, Purchase, Paywall. Installed together, automatically.

Requires

In-App Purchase capability

03

Implementation notes

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

MealApp is one root view. On first launch it asks four questions, each under a two-weight headline: how you eat, what to leave out, how many you cook for and how often you cook at home. Then it 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 has four tabs under a small floating bar with a solid active square. For You is the Recipes screen: drawn collection tiles that re-rank as you pick needs, opening a recipe with servings that rescale its ingredients and a full-screen cook mode with step timers that keeps the screen awake. Plan lays out the week with its meals as blocks and a grocery list grouped by aisle. Pantry takes what's in your fridge through an input pill and shows what to use soon. Progress is the Nutrition screen: the week's food groups as packed bubbles over the plan cooked so far. The avatar opens Settings, with the subscription and starting over.

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 first run.
  • Sample data: recipes, collections, the week and the pantry are in SprigSample at the top of MealApp.swift. Swap them for your own catalog and store; the tabs read those types.
  • Needs: each collection tile counts its recipes per need. RecipeTiles takes a rank closure when you have the recipes themselves and want exact counts.
  • Theme: everything follows the theme you set on MealApp. Without a brand it wears Sprig Press; SPBrandTheme(.sprigSol) or .sprigCandy re-skin every tab, including the food drawings.

The Xcode project

The download is a complete project on Tuist: SwiftData meals, pantry items and grocery checks behind a repository protocol; a recipe catalog with ingredients, aisles, steps and food groups; pantry matching that turns "2 limes" into an ingredient and guesses its use-by date; ranking by diet, allergies and what's about to expire; a grocery list merged across the week, scaled to servings and minus what you have; a weekly nutrition breakdown; a dinner reminder; Tonight and Groceries widgets with a mark-cooked button; three presets; unit tests and a first-run UI test.

Notes

  • Not @main: put MealApp() 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 Sprig preset.

04

Keep building

Pieces that work well next to this one.

Screen · Food

Recipes

Drawn category tiles that re-rank with a spring as you pick what you need.

Screen · Food

Nutrition

A week in packed bubbles you tap to focus, with a progress figure and capsule bars.

Template · Commerce

Subscription App

Cadence, a subscription habit tracker: a complete Xcode project with onboarding, a StoreKit 2 paywall, SwiftData, widgets and three brand presets.