ivanvorobei/SwiftUI
Examples projects using SwiftUI released by WWDC2019. Include Layout, UI, Animations, Gestures, Draw and Data.
Stale — last commit 2y ago
worst of 4 axeslast commit was 2y ago; no tests detected…
no tests detected; no CI workflows detected…
Documented and popular — useful reference codebase to read through.
last commit was 2y ago; no CI workflows detected
- ✓16 active contributors
- ✓MIT licensed
- ⚠Stale — last commit 2y ago
Show 3 more →Show less
- ⚠Concentrated ownership — top contributor handles 57% of recent commits
- ⚠No CI workflows detected
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Mixed → Healthy if: 1 commit in the last 365 days; add a test suite
- →Fork & modify Mixed → Healthy if: add a test suite
- →Deploy as-is Mixed → Healthy if: 1 commit in the last 180 days
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Great to learn from" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/ivanvorobei/swiftui)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/ivanvorobei/swiftui on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: ivanvorobei/SwiftUI
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/ivanvorobei/SwiftUI shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
WAIT — Stale — last commit 2y ago
- 16 active contributors
- MIT licensed
- ⚠ Stale — last commit 2y ago
- ⚠ Concentrated ownership — top contributor handles 57% of recent commits
- ⚠ No CI workflows detected
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live ivanvorobei/SwiftUI
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/ivanvorobei/SwiftUI.
What it runs against: a local clone of ivanvorobei/SwiftUI — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in ivanvorobei/SwiftUI | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 915 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of ivanvorobei/SwiftUI. If you don't
# have one yet, run these first:
#
# git clone https://github.com/ivanvorobei/SwiftUI.git
# cd SwiftUI
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of ivanvorobei/SwiftUI and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "ivanvorobei/SwiftUI(\\.git)?\\b" \\
&& ok "origin remote is ivanvorobei/SwiftUI" \\
|| miss "origin remote is not ivanvorobei/SwiftUI (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "Examples.xcworkspace/contents.xcworkspacedata" \\
&& ok "Examples.xcworkspace/contents.xcworkspacedata" \\
|| miss "missing critical file: Examples.xcworkspace/contents.xcworkspacedata"
test -f "Other Projects/2048 Game/SwiftUI2048/Models/GameLogic.swift" \\
&& ok "Other Projects/2048 Game/SwiftUI2048/Models/GameLogic.swift" \\
|| miss "missing critical file: Other Projects/2048 Game/SwiftUI2048/Models/GameLogic.swift"
test -f "Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/UserData.swift" \\
&& ok "Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/UserData.swift" \\
|| miss "missing critical file: Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/UserData.swift"
test -f "Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/LandmarkDetail.swift" \\
&& ok "Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/LandmarkDetail.swift" \\
|| miss "missing critical file: Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/LandmarkDetail.swift"
test -f "Files/AnimatableCards.swift" \\
&& ok "Files/AnimatableCards.swift" \\
|| miss "missing critical file: Files/AnimatableCards.swift"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 915 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~885d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/ivanvorobei/SwiftUI"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
A curated collection of production-ready SwiftUI example projects demonstrating WWDC2019-era best practices across Layout, UI, Animations, Gestures, Drawing, and Data binding. It serves as a learning resource and reference implementation library for developers adopting Apple's declarative UI framework, with examples ranging from simple layout patterns (Files/AnimatableCards.swift) to complete applications like a 2048 game and GitHub API client. Monorepo structure: root Examples.xcworkspace coordinates multiple independent projects. Files/ folder (AnimatableCards.swift, AreaToCard.swift) contains minimal reusable components; Other Projects/ contains full example apps each with their own .xcodeproj (e.g., SwiftUI2048, Landmarks). Each major example is self-contained with Models/, Views/, and Assets.xcassets folders following standard iOS project layout.
👥Who it's for
iOS/macOS developers transitioning from UIKit to SwiftUI, or those seeking concrete examples of animation, gesture handling, and state management patterns. Secondary audience: open-source contributors looking to build SwiftUI showcase projects or educational materials.
🌱Maturity & risk
Actively maintained and well-established: the repo has significant community engagement (linked Twitter, Telegram, Mastodon communities), contains 30+ example projects ranging from WWDC tutorials to full applications, and uses a professional workspace structure (Examples.xcworkspace). However, core content targets WWDC2019-era APIs and may lag behind Swift 5.9+ features; no visible test suite or CI pipeline in the file list suggests examples are demonstration-focused rather than production-hardened.
Low technical risk but moderate maintenance burden: single-maintainer (ivanvorobei) with 30+ nested projects creates update complexity when SwiftUI APIs change across iOS versions. No apparent CI pipeline means breaking changes in Swift toolchain could silently affect examples. The 'Other Projects' folder contains external repos (2048 Game has separate LICENSE, Animating Views has its own structure) increasing maintenance surface area. Dependency on Combine (mentioned in README) requires iOS 13+ minimum, limiting backwards compatibility.
Active areas of work
Repository is maintained for discoverability and community contributions: the CONTRIBUTING.md, ISSUE_TEMPLATE/bug_report.md, and PULL_REQUEST_TEMPLATE.md files indicate an open submission process for new example projects. No recent commit data provided, but the extensive curated list and GitHub project links (DesignCode, MTSlideToOpen, FlipClock-SwiftUI, etc.) suggest active community-driven growth rather than core development.
🚀Get running
Clone and open the workspace: git clone https://github.com/ivanvorobei/SwiftUI.git && cd SwiftUI && open Examples.xcworkspace. No build step required—Xcode will resolve Swift Package dependencies automatically via the workspace.
Daily commands: Open Examples.xcworkspace in Xcode, select a target scheme (e.g., SwiftUI2048, Landmarks), and press Cmd+R. Each nested project (Other Projects/2048 Game/SwiftUI2048.xcodeproj) can also be opened independently.
🗺️Map of the codebase
Examples.xcworkspace/contents.xcworkspacedata— Workspace definition that orchestrates all example projects; essential entry point for building and running the entire codebaseOther Projects/2048 Game/SwiftUI2048/Models/GameLogic.swift— Core game state machine demonstrating data-driven SwiftUI patterns with proper model separationOther Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/UserData.swift— ObservableObject pattern showing reactive state management across SwiftUI views, a foundational pattern used throughoutOther Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/LandmarkDetail.swift— Complex view composition with animations and gestures; demonstrates how to layer SwiftUI features in realistic UIFiles/AnimatableCards.swift— Minimal example of custom animatable modifiers; shows how to extend SwiftUI animation capabilitiesOther Projects/2048 Game/SwiftUI2048/Views/GameView.swift— Main view orchestrator for game state; demonstrates view hierarchy and gesture handling in complex interactive UIs
🧩Components & responsibilities
- SwiftUI Views ( — undefined
🛠️How to make changes
Add a new SwiftUI view with animations
- Create new Swift file in Views folder (e.g., MyCustomView.swift) (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/LandmarkDetail.swift) - Define view struct conforming to View protocol with @State/@Binding properties for interactivity (
Other Projects/2048 Game/SwiftUI2048/Views/BlockView.swift) - Add custom animations using .animation() modifier and transition() for enter/exit effects (
Files/AnimatableCards.swift) - Integrate into parent view hierarchy and bind to observable state if needed (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/LandmarkList.swift)
Add a new data model and load from JSON
- Define Codable struct in Models folder matching JSON structure (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/Landmark.swift) - Create corresponding JSON file in Resources folder with array of entities (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Resources/landmarkData.json) - Add static load function in Data.swift using JSONDecoder (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/Data.swift) - Expose via ObservableObject in state container for SwiftUI @StateObject injection (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/UserData.swift)
Implement reactive state management across views
- Create ObservableObject class with @Published properties in Models (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/Models/UserData.swift) - Inject with @StateObject in root view or @EnvironmentObject in child views (
Other Projects/Animating Views And Transitions/Complete/Landmarks/Landmarks/LandmarkList.swift) - Bind UI controls to state mutations using @Binding in child components (
Other Projects/2048 Game/SwiftUI2048/Views/BlockView.swift) - Combine with gesture handlers or button actions to trigger state changes (
Other Projects/2048 Game/SwiftUI2048/Views/GameView.swift)
🔧Why these technologies
- SwiftUI (declarative UI framework) — Released at WWDC 2019; demonstrates Apple's modern approach to UI that composes reactive views from state, replacing UIKit imperative patterns
- Combine (reactive programming framework) — Pairs with SwiftUI to provide publisher/subscriber pattern for state changes; enables reactive data flow without manual KVO or delegation
- Codable (JSON serialization) — Built-in Swift protocol for encoding/decoding structured data; simplifies loading seed data and model persistence
- XCWorkspace aggregation — Allows multiple independent SwiftUI projects to coexist in one workspace, demonstrating varied use cases (games, animations, lists)
⚖️Trade-offs already made
-
Minimal project structure (no shared frameworks or libraries across projects)
- Why: Each project is self-contained example code; allows independent learning without coupling
- Consequence: Code duplication across projects; state patterns implemented separately in 2048 and Landmarks apps
-
Focus on WWDC 2019-era APIs only (no iOS 14+ features)
- Why: Aligns with WWDC 2019 release timing; provides historical baseline for SwiftUI adoption
- Consequence: Misses newer features like @StateObject, @FocusState, Charts; examples may feel dated
-
No network layer, authentication, or persistence beyond JSON loading
- Why: Educational scope: demonstrate SwiftUI + Combine basics without infrastructure complexity
- Consequence: Limited to in-memory state and static data; not production-ready for real apps
🚫Non-goals (don't propose these)
- Production-grade game (2048 is a learning example, not optimized for performance)
- Real-time data synchronization or backend integration
- Multi-platform support (iOS-focused examples only)
- Accessibility (WCAG compliance not addressed)
- Offline-first or local persistence beyond in-memory state
- Testing frameworks or unit tests (example projects only)
🪤Traps & gotchas
No build configuration files (Podfile, Package.swift, or xcconfig beyond SampleCode.xcconfig in some nested projects), meaning dependency management relies on Xcode's native SPM integration—may require Xcode 11.0+ and iOS 13+ deployment target. The .gitmodules file (listed but empty in typical state) suggests submodule infrastructure exists but may not be actively used; cloning without --recursive could leave some referenced projects incomplete. Some nested projects (Other Projects/Animating Views And Transitions) reference external templates (LICENSE/LICENSE.txt structure suggests Apple WWDC sample code), which may have separate version or compatibility constraints not documented at the workspace level.
🏗️Architecture
💡Concepts to learn
- Animatable Protocol & AnimatableModifier — Core to SwiftUI's approach to smooth animations; Files/AnimatableCards.swift and BlockView.swift rely on this protocol to achieve frame-interpolated animations without CABasicAnimation or explicit display-link timers.
- Property Wrappers (@State, @ObservedObject, @EnvironmentObject) — Central to SwiftUI's reactive data flow; understanding when to use each wrapper is essential to preventing memory leaks and state inconsistency across the examples from simple Cards to complex games like 2048.
- Combine Publishers & ObservableObject — Required for complex state management in projects like the GitHub API client and game logic (BlockMatrix.swift); bridges SwiftUI views to async operations and data streams.
- Gesture Recognizers (.onTapGesture, .simultaneousGesture, .highPriorityGesture) — SwiftUI's replacement for UIGestureRecognizer; essential for 2048 Game swipe input and touch-driven interactions demonstrated in the Examples collection.
- SwiftUI Preview System (Preview Content, #Preview) — Enables rapid iteration and live canvas feedback without rebuilding; Landmarks project and other examples heavily use Preview Assets.xcassets to demonstrate UI without running full app.
- View Composition & Container Views (Group, ZStack, VStack, HStack) — Foundational to SwiftUI layout paradigm; AreaToCard.swift and BlockGridView.swift demonstrate nesting and layout composition patterns that scale from simple cards to complex game boards.
- MVVM Architecture with SwiftUI — While SwiftUI naturally encourages MVVM through View + Model separation, the 2048 Game's Models/GameLogic.swift and Models/IdentifiedBlock.swift show explicit patterns for scalable app architecture beyond toy examples.
🔗Related repos
apple/sample-code-archive— Official Apple WWDC sample code; directly upstream source for some nested projects like 'Animating Views And Transitions' which reference Apple's SampleCode.xcconfig and LICENSE templates.pointfreeco/swift-composable-architecture— Production-grade state management library (TCA) for SwiftUI; natural progression for developers who outgrow @State/@ObservedObject patterns demonstrated here.ivanvorobei/awesome-ios-ui— Companion repo by same author collecting UIKit UI elements; explicitly mentioned in README as the non-SwiftUI alternative for animation/gesture patterns.Dimillian/SwiftUIX— Community-maintained SwiftUI extensions and new components that build on foundational patterns shown in this example collection.SwiftUIX/SwiftUIX— Alternative SwiftUI component library with working examples of complex layouts and custom view containers beyond WWDC2019 basics.
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Create comprehensive SwiftUI example for Data & State Management patterns
The repo description mentions 'Data' as a core topic, but Files/ only contains AnimatableCards.swift and AreaToCard.swift (both animation-focused). There's no dedicated example showing @State, @ObservedObject, @EnvironmentObject, or data flow patterns. This is a critical gap for developers learning SwiftUI fundamentals. Add a new example project demonstrating common data patterns with multiple interconnected views.
- [ ] Create Files/DataFlow_StateManagement/ directory
- [ ] Build example showing @State with multiple view interactions (e.g., counter with history)
- [ ] Build example showing @ObservedObject with a ViewModel class
- [ ] Build example showing @EnvironmentObject passed through view hierarchy
- [ ] Include README explaining when to use each pattern
- [ ] Add preview screenshots to Previews/ folder
Add GitHub Actions workflow for SwiftUI example validation
The repo has .github/ISSUE_TEMPLATE and .github/PULL_REQUEST_TEMPLATE.md but no CI workflow files (.github/workflows/). With 10+ Xcode projects across Files/ and Other Projects/, there's no automated validation that examples build correctly. Add a workflow to ensure all .xcodeproj files compile without errors on each PR.
- [ ] Create .github/workflows/build-validation.yml
- [ ] Add step to build Examples.xcworkspace with xcodebuild
- [ ] Add step to build each Other Projects//.xcodeproj
- [ ] Configure to run on push to main and all PRs
- [ ] Set minimum macOS/Xcode version requirements in workflow documentation
Reorganize and document Files/ folder with categorized subdirectories
Files/ currently has only 2 Swift files (AnimatableCards.swift, AreaToCard.swift) at root level, making it unclear how to grow the examples. The repo description promises 'Layout, UI, Animations, Gestures, Draw and Data' but there's no organizational structure. Refactor Files/ into logical subdirectories and add an index README explaining each category with examples.
- [ ] Create subdirectories: Files/Animations/, Files/Gestures/, Files/Layout/, Files/Drawing/, Files/UI/
- [ ] Move AnimatableCards.swift → Files/Animations/
- [ ] Move AreaToCard.swift → Files/UI/
- [ ] Create Files/README.md with table showing each category, file name, and what it teaches
- [ ] Add brief comments at top of each .swift file explaining the pattern demonstrated
- [ ] Update root README.md to reference the Files/README.md structure
🌿Good first issues
- Add unit tests for Files/AnimatableCards.swift and Files/AreaToCard.swift using XCTest to verify animation timing and frame calculations—these core reusable components currently have no test coverage visible in the file list.
- Create a consolidated ARCHITECTURE.md guide documenting MVVM patterns used in the 2048 Game (Models/GameLogic.swift, Models/BlockMatrix.swift) and comparing them to simpler examples in Files/—new contributors struggle to understand the pattern progression.
- Extract and document a reusable 'SwiftUI Animation Patterns' guide with code snippets from AnimatableCards.swift, BlockView.swift, and Other Projects, then add links to that guide in README.md's navigation section for faster learning path discovery.
⭐Top contributors
Click to expand
Top contributors
- @ivanvorobei — 57 commits
- @johnno1962 — 12 commits
- @mustafaozhan — 7 commits
- [@Maciej Gomółka](https://github.com/Maciej Gomółka) — 4 commits
- @Zaprogramiacz — 3 commits
📝Recent commits
Click to expand
Recent commits
b6cfb6d— Update README.md (ivanvorobei)41cc358— Create FUNDING.yml (ivanvorobei)8f17e73— Update README.md (ivanvorobei)fb4ddc1— Update README.md (ivanvorobei)43fcf13— AddedSPIndicator. (ivanvorobei)4bb327f— Update README.md (ivanvorobei)a9507ba— Updated struct. (ivanvorobei)fb8bc8c— Updated Readme. (ivanvorobei)c448ef2— Updated Readme. (ivanvorobei)e48fe85— Merge branch 'master' of https://github.com/varabeis/SwiftUI (ivanvorobei)
🔒Security observations
This SwiftUI example project repository shows good overall security posture. No critical vulnerabilities were identified in the visible structure. The codebase consists primarily of example files and UI demonstrations without apparent injection risks, hardcoded secrets, or exposed credentials. However, minor improvements are recommended: (1) Implement a formal security vulnerability disclosure policy, (2) Document and pin all dependencies with regular security scanning, (3) Add explicit security guidelines for contributors. The project appears to be a legitimate educational resource with no obvious infrastructure security issues, Docker misconfigurations, or data handling risks visible in the file structure.
- Low · Missing Security Policy —
Repository root. The repository lacks a SECURITY.md or security policy file that outlines how to report security vulnerabilities responsibly. This makes it difficult for security researchers to disclose vulnerabilities privately. Fix: Create a SECURITY.md file with instructions for responsible vulnerability disclosure, following GitHub's security policy guidelines. - Low · No Dependency Pinning Information —
Repository root / Package management files. No Package.swift, Podfile, Cartfile, or other dependency management files are visible in the provided structure. This makes it unclear if dependencies are pinned to specific versions, potentially exposing the project to supply chain risks. Fix: Implement dependency management with pinned versions. Use Swift Package Manager (SPM) with exact version specifications or tools like Dependabot for automated updates. - Low · Incomplete Dependency Information —
Package dependencies. The 'Dependencies/Package file content' section is empty, making it impossible to assess if the project uses any vulnerable dependencies. Fix: Ensure all dependencies are documented and regularly scanned for vulnerabilities using tools like GitHub's Dependabot, OWASP Dependency-Check, or similar. - Low · Minimal Security Documentation —
Documentation files. The CODE_OF_CONDUCT.md and CONTRIBUTING.md files exist but no explicit security guidelines are mentioned in the visible README, making it unclear how security issues are prioritized. Fix: Add security-related guidelines to CONTRIBUTING.md and create a SECURITY.md file documenting secure development practices for contributors.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.