GitHub CopilotSwiftCode Style

Swift GitHub Copilot Instructions

GitHub Copilot instructions for Swift: SwiftUI, async/await, and modern iOS development patterns.

.github/copilot-instructions.md
- Use SwiftUI for all new UI; UIKit only for components not available in SwiftUI
- Apply async/await with structured concurrency; use TaskGroup for parallel work
- Use @Observable (Observation framework) instead of ObservableObject in Swift 5.9+
- Generate preview macros (#Preview) for all SwiftUI views
- Apply Swift Package Manager for all dependencies; no CocoaPods
- Use the Composable Architecture (TCA) for complex state management
- Generate XCTest unit tests alongside all business logic
- Use Swift strict concurrency checking (@Sendable, actors) in new code

How to use with GitHub Copilot

Create `.github/copilot-instructions.md` in your repository. GitHub Copilot uses these to customize suggestions across your whole repo.

#swift#swiftui#ios#copilot#github#coding-rules

Related Rules