← ClaudeAtlas

arch-mvclisted

Apple Cocoa MVC for iOS (UIKit). Use when implementing or refactoring against the default Apple sample-code pattern. Reject for production apps that will scale past 20 screens.
kbelasheuski/ios-architecture-skills · ★ 0 · AI & Automation · score 72
Install: claude install-skill kbelasheuski/ios-architecture-skills
# Apple Cocoa MVC **Source references:** - Apple, *Model-View-Controller* (legacy archive) — https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Model-View-Controller/Model-View-Controller.html - Apple sample, *DiffableDataSources* — https://developer.apple.com/documentation/uikit/uitableviewdiffabledatasource ## When to use - Prototypes, throwaway apps. - Solo dev, ≤ 20 screens, no networking-heavy flows. - Apple sample code parity. - Reject for any production app expected to scale. ## Folder structure ``` App/ AppDelegate.swift SceneDelegate.swift Models/ User.swift UserRepository.swift Views/ UserCell.swift Controllers/ UserListViewController.swift UserDetailViewController.swift ``` ## Reference implementation The worked `UserList + UserDetail` feature lives in **`examples/mvc/`** — diffable-data-source `UserListViewController`, a `UserDetailViewController` with save/dirty state, the `SceneDelegate` composition root, and the limited VC-level tests. `Domain` + `Data` follow `skills/REFERENCE_FEATURE.md` (vendored per example). Key things to notice: - **The view controller is the SUT** — there is no layer between it and the repository, so the `load`/snapshot/navigation logic all lives in the VC. This is the bloat MVC is known for. - **Pull-to-refresh + pagination + cancellation** are hand-wired in the VC (`loadTask` cancels on reassignment); MVVM would move this into a model. - **VC testing is fragile** —