ios-patterns

Implement SwiftUI features with MVVM, async/await, repositories, and SwiftData.

6|1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/wesleyosantos91/multi-agents --skill ios-patterns-wesleyosantos91
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-patterns
Source: https://github.com/wesleyosantos91/multi-agents/tree/main/devin/.devin/skills/ios-patterns
Command: npx skills add https://github.com/wesleyosantos91/multi-agents --skill ios-patterns-wesleyosantos91

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of designing and implementing scalable modern iOS codebases by providing proven Swift + SwiftUI architecture patterns that reduce inconsistency and rework across screens and features.

Core Features & Use Cases

  • SwiftUI-first architecture: Uses NavigationStack/NavigationPath and view composition patterns that fit iOS modern UI development.
  • Structured concurrency and state management: Implements async/await workflows and an @Observable ViewModel with typed view states for loading, error, and success flows.
  • Clean layering and repositories: Separates Domain models/use cases from Data repository implementations and URLSession API clients, enabling testable and maintainable features.
  • Local persistence options: Shows SwiftData (iOS 17+) patterns as a modern alternative to Core Data for offline-friendly apps.
  • Testing guidance: Provides unit, snapshot, and UI testing approaches to keep behavior stable during iteration.

Quick Start

Use this skill to generate an iOS SwiftUI feature implementation following MVVM, async/await, repositories, NavigationStack, and SwiftData persistence for a new Orders screen.

Frequently Asked Questions about ios-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement SwiftUI MVVM architecture with async/await and repository patterns?

SwiftUI MVVM architecture with async/await is implemented by using @Observable ViewModels for typed state handling, separating domain use cases from data repositories, and building URLSession API clients to manage structured concurrency workflows in production iOS apps.

What's the best way to handle SwiftUI navigation state with NavigationStack and NavigationPath?

Handling SwiftUI navigation state requires using NavigationStack and NavigationPath to manage routing. This approach fits modern iOS UI development by enabling consistent view composition and type-safe navigation routing across scalable application features.

How do I set up SwiftData persistence in an iOS 17 app with clean architecture layers?

SwiftData persistence in iOS 17+ is set up by integrating it as a modern alternative to Core Data within a clean architecture. This involves wiring SwiftData into your data access layer while maintaining robust error handling and separation from domain models.

How should I structure unit, snapshot, and UI tests for SwiftUI features using @Observable?

Testing SwiftUI features involves structuring unit, snapshot, and UI tests around @Observable ViewModels and repository protocols. This testing approach ensures behavior remains stable during iteration by validating loading, error, and success state flows.

Does this iOS architecture pattern support separating domain use cases from URLSession API clients?

Yes, this iOS architecture pattern supports separating domain use cases from URLSession API clients. It structures repositories with protocol and implementation separation, enabling testable and maintainable features that rely on external API networking.

When should I use SwiftData instead of Core Data for local persistence in SwiftUI?

You should use SwiftData instead of Core Data when building offline-friendly SwiftUI apps targeting iOS 17+. SwiftData provides a modern persistence alternative that integrates natively with modern Swift concurrency and clean layering patterns.