
Ios Networking
A solid reference for URLSession patterns in modern Swift. Covers the async/await APIs introduced in iOS 15, structured concurrency, and protocol-based client architecture with middleware support. The guide includes practical patterns for token refresh, pagination, streaming with AsyncBytes, and error mapping from URLError cases. It's opinionated in the right ways: status code validation (since URLSession doesn't throw on 4xx/5xx), always using download for large files to avoid memory issues, and avoiding completion handlers entirely in new code. The structured error types and endpoint modeling are clean. Use this when you're building or reviewing API clients and want to stick with first-party frameworks instead of reaching for Alamofire.
- skills.sh installs
- 4.6K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill ios-networking --agent claude-codeInstalls into .claude/skills of the current project.
Files
iOS Networking
Use URLSession with async/await and structured concurrency for ordinary HTTP, REST, uploads, downloads, and streaming. Use Network.framework for lower-level protocols and delegate/task APIs for durable background transfers.
Contents
- Core URLSession async/await
- API Client Architecture
- Error Handling
- Pagination
- Network Reachability
- Configuring URLSession
- App Transport Security (ATS)
- Common Mistakes
- Review Checklist
- References
Core URLSession async/await
URLSession gained native async/await overloads in iOS 15. Prefer these for foreground data, upload, download, and streaming work. Background URLSession transfers are the main exception: they still use task/delegate APIs so the system can deliver events after suspension or relaunch.
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Backend & APIs, DevOps & CI/CD, Git & Pull Requests, Code Review & Quality, Debugging, Mobile Development
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Swiftui Navigation4.6K
- Swift Testing4.5K
- Ios Localization4.5K
- Swift Concurrency4.5K
- Swiftui Layout Components4.4K
- Push Notifications4.4K
- Swiftui Liquid Glass4.3K
- Swiftdata4.3K
- Debugging Instruments4.3K
- Swiftui Uikit Interop4.2K
- Storekit4.2K
- Widgetkit4.2K
- Swiftui Gestures4.2K
- Apple On Device Ai4.2K
- Swift Charts4.2K
- Swift Language4.1K
- App Intents4.1K
- Authentication4.1K
- Background Processing4.1K
- Healthkit4K
- Vision Framework4K
- Coreml3.9K
- Core Bluetooth3.9K
- Core Motion3.8K