References cover each area in depth: concurrency, architecture/DI, testing, i18n, and performance.
Best practices: prefer actors over classes with locks for shared state, @Observable over ObservableObject, structured concurrency over completion handlers, String Catalogs for all user-facing text, profiling in Release (-O) builds, and value types (structs) over classes where possible.
Swift Core
Swift 6 fundamentals shared across all Apple platforms.
Agent Workflow (MANDATORY)
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
- fuse-ai-pilot:explore-codebase - Analyze existing Swift patterns
- fuse-ai-pilot:research-expert - Verify latest Swift 6 docs via Context7/Exa
- mcp__apple-docs__search_apple_docs - Check Swift concurrency patterns
After implementation, run fuse-ai-pilot:sniper for validation.
Overview
When to Use
- Implementing async/await, actors, Sendable
- Designing app architecture (MVVM, Clean Architecture)
- Writing async tests with XCTest
- Localizing with String Catalogs
- Profiling with Instruments
Why Swift Core
| Feature |
Benefit |
| Actors |
Thread-safe shared state without locks |
| @Observable |
Simple reactive state (replaces ObservableObject) |
| String Catalogs |
Automatic localization with Xcode 15+ |
| Instruments |
Built-in performance profiling |
Key Concepts
Concurrency (Swift 6)
Modern async/await with strict concurrency checking. Actors provide thread-safe state, Sendable marks safe types.
Architecture
MVVM with @Observable is the recommended pattern. Clean Architecture for complex apps with domain separation.
Testing
XCTest with native async/await support. No need for expectations with async tests.
Internationalization
String Catalogs are mandatory. All user-facing text must be localized.
Performance
Profile with Instruments. Use lazy loading, avoid heavy work in view body.
Reference Guide
| Need |
Reference |
| Async/await, actors, Sendable |
concurrency.md |
| MVVM, Clean Architecture, DI |
architecture.md |
| XCTest, async tests, mocking |
testing.md |
| String Catalogs, localization |
i18n.md |
| Instruments, optimization |
performance.md |
Best Practices
- Actors for shared state - Prefer actors over classes with locks
- @Observable over ObservableObject - Simpler, better performance
- Structured concurrency - async/await, no completion handlers
- String Catalogs - ALL user-facing text must be localized
- Profile in Release - Always profile with
-O optimization
- Value types - Prefer structs over classes
1---2name: swift-core3description: Use when implementing Swift 6 fundamentals — concurrency, architecture, testing, i18n, or performance — across any Apple platform.4versions:5 swift: 6.26 ios: 267user-invocable: false8references: references/concurrency.md, references/architecture.md, references/testing.md, references/i18n.md, references/performance.md9related-skills: swiftui-core, solid-swift, ios, macos, ipados, watchos, visionos10metadata:11 source: https://skillmd.com/skills/fusengine/swift-core12---1314<objective>15Covers Swift 6 language and platform fundamentals shared across iOS, macOS, iPadOS, watchOS, and visionOS: async/await and actors with strict concurrency checking, Sendable typing, app architecture (MVVM with @Observable as the recommended default, Clean Architecture for complex apps), async testing with XCTest, String Catalog-based localization, and performance profiling with Instruments.1617References cover each area in depth: concurrency, architecture/DI, testing, i18n, and performance.1819Best practices: prefer actors over classes with locks for shared state, @Observable over ObservableObject, structured concurrency over completion handlers, String Catalogs for all user-facing text, profiling in Release (-O) builds, and value types (structs) over classes where possible.20</objective>2122# Swift Core2324Swift 6 fundamentals shared across all Apple platforms.2526## Agent Workflow (MANDATORY)2728Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`:29301. **fuse-ai-pilot:explore-codebase** - Analyze existing Swift patterns312. **fuse-ai-pilot:research-expert** - Verify latest Swift 6 docs via Context7/Exa323. **mcp__apple-docs__search_apple_docs** - Check Swift concurrency patterns3334After implementation, run **fuse-ai-pilot:sniper** for validation.3536---3738## Overview3940### When to Use4142- Implementing async/await, actors, Sendable43- Designing app architecture (MVVM, Clean Architecture)44- Writing async tests with XCTest45- Localizing with String Catalogs46- Profiling with Instruments4748### Why Swift Core4950| Feature | Benefit |51|---------|---------|52| Actors | Thread-safe shared state without locks |53| @Observable | Simple reactive state (replaces ObservableObject) |54| String Catalogs | Automatic localization with Xcode 15+ |55| Instruments | Built-in performance profiling |5657---5859## Key Concepts6061### Concurrency (Swift 6)62Modern async/await with strict concurrency checking. Actors provide thread-safe state, Sendable marks safe types.6364### Architecture65MVVM with @Observable is the recommended pattern. Clean Architecture for complex apps with domain separation.6667### Testing68XCTest with native async/await support. No need for expectations with async tests.6970### Internationalization71String Catalogs are mandatory. All user-facing text must be localized.7273### Performance74Profile with Instruments. Use lazy loading, avoid heavy work in view body.7576---7778## Reference Guide7980| Need | Reference |81|------|-----------|82| Async/await, actors, Sendable | [concurrency.md](references/concurrency.md) |83| MVVM, Clean Architecture, DI | [architecture.md](references/architecture.md) |84| XCTest, async tests, mocking | [testing.md](references/testing.md) |85| String Catalogs, localization | [i18n.md](references/i18n.md) |86| Instruments, optimization | [performance.md](references/performance.md) |8788---8990## Best Practices91921. **Actors for shared state** - Prefer actors over classes with locks932. **@Observable over ObservableObject** - Simpler, better performance943. **Structured concurrency** - async/await, no completion handlers954. **String Catalogs** - ALL user-facing text must be localized965. **Profile in Release** - Always profile with `-O` optimization976. **Value types** - Prefer structs over classes