swift-networking
Installation
SKILL.md
Swift Networking
Lifecycle Position
Phase 3 (Implement). Load when building features that call external APIs or persist remote data.
Workflow Decision Tree
1) Build a REST API client
- Define a protocol-based API client (see
references/networking-patterns.md) - Use
URLSession.shared.data(for:)for standard requests - Decode responses with
JSONDecoderconfigured for the API's conventions - Handle errors at every layer: network → HTTP status → decode → domain
2) Download files
- Use
URLSession.shared.download(from:)for large files - Monitor progress with
AsyncBytesor delegate - Save to temporary directory, then move to final location