A modern iOS application demonstrating clean architecture (MVVM-C), Swift Concurrency, modular design with Swift Package Manager, and best practices for scalable iOS development.
| Category | Technology |
|---|---|
| Language | Swift 6.0 |
| UI Framework | SwiftUI + UIKit |
| Reactive & Concurrency | Combine, Swift Concurrency (async/await) |
| Architecture | MVVM + Coordinator |
| Dependency Injection | Session-Scoped DI + Property Wrapper |
| Package Management | Swift Package Manager |
| Minimum iOS | iOS 15.0 |
| Testing | Swift Testing, swift-snapshot-testing |
Fun/
├── Application/ # iOS app entry point
├── Coordinator/ # Navigation coordinators
├── UI/ # SwiftUI views & UIKit controllers
├── ViewModel/ # Business logic (MVVM)
├── Model/ # Data models & protocols
├── Services/ # Concrete service implementations
└── Core/ # Utilities, DI container, L10n
Dependency Hierarchy:
Application → Coordinator → UI → ViewModel → Model → Core
Services ────────────────────┘
- ViewModel: Business logic, state management
- View: Pure UI (SwiftUI)
- Coordinator: Navigation flow, screen transitions
Each app flow gets its own session with a dedicated set of services. When the flow changes, the old session tears down and a fresh one activates — no stale state leaks between login and main.
LoginSession: logger, network, featureToggles
AuthenticatedSession: logger, network, featureToggles, favorites, toast
// Sessions activate/teardown automatically on flow transitions
protocol Session: AnyObject {
func activate() // register services
func teardown() // reset ServiceLocator
}
// ViewModels resolve lazily — no changes needed
@Service(.network) var networkService: NetworkServiceAll services defined as protocols in Model, implementations in Services.
AppCoordinator manages login/main flow transitions with session lifecycle.
URL scheme funapp:// for navigation:
funapp://tab/items- Switch to Items tabfunapp://item/swiftui- Open item detailfunapp://profile- Open profile
Test from terminal:
xcrun simctl openurl booted "funapp://tab/items"
xcrun simctl openurl booted "funapp://item/swiftui"Deep links received during login are queued and executed after authentication.
| Login | Home | Items | Settings |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- Session-Scoped DI: Clean service lifecycle per app flow — no stale state
- Reactive Data Flow: Combine framework with
@Publishedproperties - Feature Toggles: Runtime flags persisted via services
- Error Handling: Centralized
AppErrorenum with toast notifications - Modern Search: Debounced input, loading states
- Pull-to-Refresh: Native SwiftUI
.refreshable - iOS 17+ APIs: Symbol effects, sensory feedback (backwards compatible)
UIKit for navigation (reliable Coordinator pattern), SwiftUI for content.
| Use Case | Framework |
|---|---|
| Navigation/Presentation | UIKit (UINavigationController + Coordinators) |
| Content & Layout | SwiftUI (all views) |
| Forms & Settings | SwiftUI |
- Unit Tests: ViewModels, services, and session lifecycle
- Session DI Tests: Activation, teardown, transitions, state isolation
- Snapshot Tests: Visual regression testing for all views
- Parameterized Tests: Swift Testing with custom scenarios
- Xcode 16.0+
- iOS 15.0+
- Swift 6.0
git clone https://github.com/g-enius/Fun.git
cd Fun
open Fun.xcworkspace- Open
Fun.xcworkspace - Select
FunAppscheme - Choose simulator (iPhone 17 Pro recommended)
Cmd + Rto build and run
xcodebuild test -workspace Fun.xcworkspace -scheme FunApp \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro'- SwiftLint with strict rules (no force unwraps)
- GitHub Actions CI (lint, build, test)
- OSLog structured logging
- SwiftGen for type-safe localization
This project demonstrates AI-assisted iOS development using Claude Code with MCP integration.
Architecture and patterns designed by developer. Claude assisted with:
- Feature implementation
- Bug fixes
- Test coverage
- Documentation
Commits with AI assistance include Co-Authored-By: Claude attribution.
MIT License





