Appendix S: QuickNote (Shop Manual)

Status: Live on the App Store. GPL v3. Public repo at github.com/fluhartyml/QuickNote. Build-Along chapter: Part VII Build-Along 02. QuickNote is a small, focused note-taking app: one note title, a free-form body, a date, and a photo grid. SwiftData persists the notes; a home-screen widget mirrors the three most-recent. Book 09 (Text and TextField) and Book 16 (Extensions and Packages) both reach for this app as their primary Live Reference.

What it is

An iPhone-first quick-capture app for thoughts that need to land somewhere before they're forgotten. The note model is intentionally minimal: title, body, date, optional photos. No tags, no folders, no nested hierarchy — the app's job is to make capture fast, not to host an organizational system. SwiftData stores everything. A WidgetKit extension surfaces the most recent notes on the home screen without launching the full app.

Architecture overview

SwiftUI + SwiftData host app with a sibling WidgetKit extension target. The two targets share data through an App Group container.

Host app file roles:

Widget extension file roles:

The data model

A single SwiftData @Model covers everything:

@Model
final class Note {
    var title: String
    var body: String
    var date: Date
    var photoData: [Data]   // small inline thumbnails; full-size images on disk

    init(title: String = "", body: String = "", date: Date = .now, photoData: [Data] = []) {
        self.title = title
        self.body = body
        self.date = date
        self.photoData = photoData
    }
}

The ModelContainer is wired in QuickNoteApp.swift with the App Group container as its persistence location, so the widget can read the same store the host app writes to.

Input surface (Book 09 / Book 10 reference)

The Note Detail view is one of the cleanest production examples of TextField + TextEditor together:

Widget extension (Book 16 reference)

The widget shows the three most-recent notes on the home screen. Architecture:

Sheets, alerts, contact

Build + deployment

Known gotchas

Sources