Dogear: Reading App in SwiftUINew
Setup guide for Dogear, a complete Reading App Xcode project in SwiftUI. Install, rename and theme version 1.0.0.
Dogear is a complete Reading App in SwiftUI: an Xcode project you rename and ship. Dogear, a reading tracker: a complete Xcode project with the book in hand, timed reading sessions, passages kept from a photo of the page, the year's shelf against a goal, widgets and three brand presets. This guide takes you from download to a running, renamed app. It covers version 1.0.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, Dogear/.
Make it yours
cd Dogear
scripts/setup.sh --name YourApp --bundle-id com.you.yourapp --preset dogear-risoThe 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
Dogear ships 15 screens, joined by 5 flows. Play each flow step by step on the site:
- First Run: onboarding, 8 steps. A welcome over a pile of covers, your first book, the year's goal and a daily reminder, then an account and Dogear Plus, landing on Reading.
- Read A Session: core journey, 6 steps. Start a session on the book in hand, turn the pages you read, pause, and save it so the book, the week and the streak move on.
- Keep A Passage: core journey, 6 steps. Snap a page mid-session, tap the lines worth keeping, and find the passage on the book, in the library and on Year.
- Your Year And Shelf: core journey, 5 steps. From the year's ring and spines to the library and a book, sorted and reordered.
- Settings And Theme: profile and settings, 6 steps. From the Settings tab to the goal, the session length, the reminder and the themes Plus unlocks, then signing out.
Every screen is a SwiftUI view in the project. Search for its type to find the file.
| Screen | SwiftUI view | Where |
|---|---|---|
| Welcome | DogearOnboarding | First run |
| Your Book | DogearOnboarding | First run |
| Your Goal | DogearOnboarding | First run |
| A Daily Nudge | DogearOnboarding | First run |
| Sign In | SignInView | Account and subscription |
| Dogear Plus | PaywallView | Account and subscription |
| Reading | ReadingScreen | Tabs |
| Library | LibraryScreen | Tabs |
| Year | YearScreen | Tabs |
| Session | SessionScreen | Details and sheets |
| Session Done | SessionSummary | Details and sheets |
| New Highlight | HighlightCapture | Details and sheets |
| Book | BookDetailScreen | Details and sheets |
| Settings | DogearSettingsScreen | Profile and settings |
| Theme | ThemeSettingsView | Profile and settings |
Rebrand options
| Option | What it sets |
|---|---|
--name | Target, scheme and product name. Letters and digits. |
--bundle-id | The bundle id. The widget, modules, tests and the App Group derive theirs from it. |
--display-name | The name under the icon. Copy that mentions the app reads it at runtime. |
--team | Your Apple Developer team id. |
--preset | The starting brand preset. Also re-renders the app icon. |
--product-prefix | App 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
Dogear 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.
| Preset | Id | Look | Type |
|---|---|---|---|
| Phosphor | dogear-phosphor | Terminal black, amber and green phosphor, squared technical type, dithered pixels. | Chakra Petch |
| Riso | dogear-riso | Newsprint, fluorescent pink and riso blue, overprinted shapes and halftone. | Bricolage Grotesque |
| Velvet | dogear-velvet | Aubergine night, brass and jewel blocks. | New York |
- Blocks:
theme.color.tilesholds 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)andtheme.type.display(40)set any size in the family's style, scaling with Dynamic Type. - Backdrop:
SPBrandBackdropdraws 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:
.spGlassuses 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
PurchaseStorehandles StoreKit 2: products, purchase, restore and transaction updates. The scheme runs withConfiguration/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
.yearlyand.monthly). AccountStoresigns 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.
| Argument | Effect |
|---|---|
-SPMockStore | Local purchases with the same plans |
-SPMockAccount | A signed-in sample account |
-SPSkipOnboarding | Open on the home screen |
-SPResetOnboarding | Run first launch again |
-SPResetData | Reseed the sample data |
-SPTab followed by a tab id | Open a tab |
-SPPresent paywall | Present the paywall |
-SPPreset dogear-riso | Start with a preset |
-SPAppearance dark | Force light or dark |
Changelog
1.0.0
2026-11-08
- Tuist project with feature modules (Onboarding, Reading, Session, Library, Year, Settings) on a shared DesignSystem and the ShelfKit domain module.
- One-command setup: name, bundle id, team, product ids, brand preset and app icon.
- Brand presets Phosphor (default), Riso and Velvet with Chakra Petch, Bricolage Grotesque and New York display type, switchable in Settings. Book covers are drawn from the preset's art: dithered pixels, overprinted inks or rings.
- First run with a fanned pile of covers, the book you're reading now (or the sample shelf), the year's goal, a daily reading reminder, Sign in with Apple or no account, and a StoreKit 2 paywall with a
.storekitconfiguration and a mock store for demos. - A floating tab bar inset from the screen's edges: Reading, Library, Year and Settings.
- Reading on the NowReading screen: the book in hand with its progress and the time left at your pace, Start session, a quote button for highlights, the week's reading with your streak, and the pile.
- Sessions on the ReadingSession screen: a clock in a ring of ticks toward the session's length, the page counter, Focus (keeps the screen awake), pause, and a summary of what the session added before it's saved. A running session survives the app closing and can be left and resumed.
- Highlights from a photo of the page: Vision reads the lines on device, you tap the passage. Or type it.
- Library: every book by shelf, the pile reordered by dragging, every highlight, and a page for each book with its sessions, highlights and actions.
- Year on the ReadingYear screen: the goal ring and your pace, pages, hours and longest streak, the year's books as spines on a shelf, and the highlight of the month.
- SwiftData persistence in an App Group with a believable sample year and a repository protocol.
- Now Reading (small) and Reading goal (medium) widgets.
- Light and dark mode, Dynamic Type through the accessibility sizes, VoiceOver labels and adjustable controls, Reduce Motion.
- String catalog, unit tests and first-run and settings UI tests.









