Template · Food

Meal Planner SwiftUI Template

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. 18 screens and 4 flows in Sprig, as a SwiftUI app template.

A meal planning app on four tabs. First run asks about diet, allergies, household size and a weekly goal, then offers Sign in with Apple 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.

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

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

01

Flows

Complete journeys through Sprig, 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 four questions, an account and Sprig Plus, to recipes ranked for your pantry.

8 Screens11 Steps
Play the flow
  1. 01Welcome
  2. 02How You Eat
  3. 03Anything To Leave Out
  4. 04Cooking For Two
  5. 05Weekly Goal
  6. 06Keep Your Kitchen Safe
  7. 07Sign In With Apple
  8. 08Sprig Plus
  9. 09Start The Free Trial
  10. 10Plus Unlocked
  11. 11For You

02 · Core Journey

Cook Tonight's Dinner

Pick a need, open a collection and tonight's recipe, cook it step by step with timers, and see Progress count it.

5 Screens11 Steps
Play the flow
  1. 01Pick A Need
  2. 02Warm Bowls
  3. 03Crispy Tofu Peanut Bowl
  4. 04Read The Method
  5. 05Cook Mode
  6. 06A Timed Step
  7. 07Timer Running
  8. 08Time's Up
  9. 09Ready To Eat
  10. 10Progress Counts It
  11. 11Tap A Food Group

03 · Core Journey

Plan The Week And Shop

Swap a dinner for one that uses what's about to turn, shop the list aisle by aisle and put it in the pantry.

3 Screens10 Steps
Play the flow
  1. 01Plan
  2. 02Pick A Day
  3. 03Hold A Meal
  4. 04Swap Recipe
  5. 05Added To Your Plan
  6. 06The Grocery Card
  7. 07Grocery List
  8. 08Check Things Off
  9. 09Into The Pantry
  10. 10Check Off The Pantry

04 · Profile And Settings

Profile And Settings

Change your diet and theme from the avatar, upgrade to Sprig Plus and start over.

6 Screens10 Steps
Play the flow
  1. 01Open Profile
  2. 02Profile
  3. 03Change Diet
  4. 04Theme
  5. 05Upgrade To Plus
  6. 06Plus Unlocked
  7. 07Plus On Profile
  8. 08Sign Out
  9. 09Signing Out
  10. 10Back To The Start

02

Screens

Every screen in Sprig, 18 in all, each a SwiftUI view in the Xcode project. In Press, Sol and Candy, light and dark.

First run

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

  • Welcome

    Four drawn recipe tiles and one line on what Sprig does, then Get started.

    Built onRecipes

  • Diet

    Pick how you eat, from everything to vegan, so For You only shows recipes that fit.

  • Allergies

    Mark the allergens anyone you cook for avoids, or leave them all off.

  • Household

    Set how many people you cook for, which sets the servings of new meals and the grocery amounts.

  • Weekly Goal

    Choose how many home-cooked meals a week Progress counts toward.

Account and subscription

Sign in, verification and the paywall.

  • Sign In

    Sign in with Apple to back up your plan and pantry, or continue without an account.

  • Sprig Plus

    Start Sprig Plus with a week free to plan breakfast and lunch too, or close it and keep dinners free.

    Built onPurchasePaywall

Tabs

Where the app opens, one screen per tab.

  • For You

    Browse drawn recipe collections that re-rank by what you need and what's in your pantry.

    Built onRecipes

  • Plan

    See the week as a strip of days, each day's breakfast, lunch and dinner as blocks, and the grocery list they build.

    Built onRecipes

  • Pantry

    Type what's in your fridge, see what to use soon with a recipe for each, and check things off as they run out.

  • Progress

    See the week's food groups as packed bubbles, the plan cooked so far over a dot grid, and each day's meals.

    Built onNutrition

Details and sheets

What the tabs push and present.

  • Collection

    Open a collection's recipes as blocks, best fit for your pantry first, each with what it uses.

    Built onRecipes

  • Recipe

    Read a recipe's facts, scale its servings, see what's in your pantry and the method, then plan it or start cooking.

    Built onRecipes

  • Cook Mode

    Cook one step per page on the recipe's block, with a timer on the steps that need one and the screen kept awake.

  • Grocery List

    Shop the rest of the week's ingredients by aisle, minus what you have, and put what you bought in the pantry in one tap.

Profile and settings

The account, preferences, the subscription and sign out.

  • Profile

    Manage Sprig Plus, your kitchen, the dinner reminder, the theme and appearance, or start over.

    Built onSettings

  • Change Diet

    Pick a different diet from Profile, and For You ranks recipes around it.

    Built onSettings

  • Theme

    Switch between the Press, Sol and Candy presets and set 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

Diet, allergies, household size and goals, then Sign in with Apple (or continue without an account) and the StoreKit 2 paywall. Runs once, then records completion.

Tabs

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

From the tabs

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

04

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

05

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. Its first run adds an account step between the weekly goal and the paywall: Sign in with Apple, or continue without an account. Underneath are 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.