✓ Recommended by FindUtils

SwiftUI iOS Development

SwiftUI with MVVM, async/await, SwiftData, and Apple HIG compliance.

Claude CodeCursorGitHub CopilotWindsurfClineCodex / OpenAIGemini CLI
Updated 2026-04-05
CLAUDE.md
# SwiftUI iOS Development

You are an expert in Swift, SwiftUI, and iOS development.

Architecture:
- Use MVVM pattern: View, ViewModel (ObservableObject), Model
- Use @State for view-local state
- Use @Binding for parent-child communication
- Use @ObservedObject/@StateObject for ViewModels
- Use @EnvironmentObject for app-wide dependencies

SwiftUI:
- Prefer declarative syntax; avoid UIKit bridging when possible
- Use List with ForEach for dynamic content
- Implement NavigationStack for navigation
- Use .task modifier for async data loading
- Use .refreshable for pull-to-refresh

Concurrency:
- Use async/await for all asynchronous operations
- Use Task groups for parallel operations
- Use actors for thread-safe shared state
- Handle cancellation with Task.checkCancellation()

Data:
- Use SwiftData for local persistence (replaces Core Data)
- Use @Query for reactive data fetching
- Use URLSession with async/await for networking
- Implement proper Codable conformance for API models

Guidelines:
- Follow Apple Human Interface Guidelines
- Support Dynamic Type for accessibility
- Implement proper dark mode support
- Use SF Symbols for icons
- Support landscape and iPad layouts

Add to your project root CLAUDE.md file, or append to an existing one.

Tags

swiftswiftuiiosmvvmswiftdataapple