Pocket Pantry
Building a SwiftData-first App in iOS 26 with Intention & Deliberate Decisions
Pocket Pantry is a small application by intention, but it’s not a small exercise. It exists to force architectural and data-modeling decisions into the open, where they can be examined instead of hidden behind scale, polish, or premature abstraction. In the context of iOS 26, this matters more than ever because the platform’s growing capabilities make it easier to introduce structure and abstraction that an app simply doesn’t need. iOS gives developers a lot of tools, but power without restraint produces noise rather than clarity.
This app is not about managing groceries. It’s about understanding how SwiftData behaves under real constraints, how SwiftUI responds when models are treated as first-class citizens, and how architecture can remain optimal instead of fashionable. Pocket Pantry makes it possible to study those behaviors in isolation, without feature creep or UI polish diluting what’s being learned.
Choosing the Problem Space
Pocket Pantry was intentionally scoped to a domestic, almost boring domain. Inventory, quantities, and optional expiration dates aren’t exciting features, but they immediately expose persistence concerns in a way more abstractexamples don’t. There’s no way to build this app without dealing directly with data modeling, mutation, and querying, and that pressure is exactly what makes the problem space useful.
This kind of domain makes the strengths and weaknesses of a persistence framework obvious very quickly. SwiftData can’t hide behind demo-friendly examples or idealized flows here. It has to support real updates, real deletes, and real state transitions without ceremony or fragility. When a framework struggles with something as basic as updating an item count or handling an optional date, its limitations are hard to ignore. That’s why Pocket Pantry was chosen as the first app in this series.
Architecture as a Cost Function
Pocket Pantry uses a Model–View (MV) architecture. In this context, MV refers to a straightforward separation where models own data and state, views are responsible for presentation, and application behavior lives in services rather than intermediary layers. There is no additional abstraction tier managing view state. The structure is simple by design, not by omission.
That choice wasn’t made to provoke debate or to dismiss MVVM as a pattern. MVVM is still a valid approach for many applications, especially those with complex presentation logic, shared state across multiple views, or cross-platform synchronization needs. The decision here wasn’t about rejecting MVVM in principle, but about whether it paid for itself in this specific app.
Swift as a language already covers much of what ViewModels are traditionally used for. Value semantics, expressive enums, property wrappers, and SwiftData’s model integration reduce the need for intermediary layers that mirror state instead of owning it. In Pocket Pantry, adding ViewModels would have introduced duplication and coordination overhead without making the app clearer or easier to maintain.
Letting models own state and services own behavior keeps the architecture lean without oversimplifying it. Views remain declarative and disposable, while logic stays centralized and testable. The benefit isn’t fewer files for the sake of minimalism, but fewer places where intent can drift or become ambiguous over time.
Architecture here is treated as an optimization problem, not an ideological stance.
SwiftData in iOS 26: Designing for Constraints
SwiftData in iOS 26 is capable, but it’s also opinionated. Trying to force it into patterns it doesn’t support usually leads to subtle problems later, especially once CloudKit enters the picture. Even though Pocket Pantry doesn’t currently sync with CloudKit, its data models were designed with those constraints in mind from the start.
That discipline shows up in everything from optionality and default values to how relationships are defined. SwiftData rewards models that are explicit, conservative, and predictable, and it tends to push back against clever designs that prioritize elegance over reliability. Treating those constraints as design inputs rather than limitations leads to models that are easier to evolve and reason about.
A representative model from the app shows this approach:
@Model
final class PantryItem {
var name: String
var quantity: Int
var expiryDate: Date?
}
There’s nothing decorative in this definition. Every property exists for a specific reason, and every type choice reflects how SwiftData persists and evolves data over time. This restraint reduces future migration risk and keeps the app aligned with CloudKit’s expectations long before synchronization becomes a requirement.
The full Pocket Pantry implementation, including models, services, and architectural decisions, is available here:
GitHub: https://github.com/initMoin/portfolio/tree/main/PocketPantry
Services as the Boundary of Responsibility
Rather than introducing ViewModels, Pocket Pantry relies on services to encapsulate behavior that doesn’t belong in the UI layer. Creating, mutating, and deleting pantry items happens outside SwiftUI views, which keeps presentation concerns separate from business rules and intent.
That separation matters. Services provide a stable boundary where rules can change without pulling UI code along with them, and views become consumers of state instead of coordinators of logic. As the app grows, this structure scales naturally without forcing architectural rewrites or pattern shifts.
In iOS 26, where system integrations continue to blur the line between app and operating system, having clear responsibility boundaries becomes more important, not less.
Intentional Minimalism in SwiftUI
The user interface in Pocket Pantry is intentionally minimal. That isn’t a sign of unfinished work, but a deliberate choice to preserve signal while learning. SwiftUI already offers strong layout and composition tools, and introducing custom abstractions too early would have obscured the behaviors being examined.
Keeping the UI simple makes changes in persistence and state propagation easier to observe and reason about. When a model updates, the UI responds immediately and predictably, without animations or styling layers masking that relationship. Minimalism here isn’t aesthetic; it’s methodological.
What Pocket Pantry Reveals About iOS 26 Development
Building Pocket Pantry clarified several things about modern iOS development. SwiftData is viable when its constraints are acknowledged early. MV remains a strong default when models are expressive and services are clearly defined. CloudKit compatibility isn’t something that can be bolted on casually. More than anything, restraint accelerates understanding faster than experimentation without boundaries.
This app isn’t meant to be copied wholesale. It’s meant to be examined as a record of decisions made under the realities of iOS 26, along with the tradeoffs those decisions carry.
Setting the Foundation for What Comes Next
Pocket Pantry establishes a baseline for the rest of the iOS 26 Micro-Apps series. It shows how to approach persistence, architecture, and system constraints without spectacle or unnecessary abstraction. The apps that follow explore different parts of the platform, but they all inherit the same posture, favoring clarity over cleverness and intent over accumulation.
iOS 26 rewards developers who choose structure carefully. Pocket Pantry is where that lesson starts.

