What problem does it solve?
This Skill unit provides comprehensive guidance and examples for building, reviewing, and improving networking code in iOS/macOS apps. It eliminates the complexities of managing REST APIs, file transfers, and network state in your apps.
Core Features & Use Cases
- Modern Networking Patterns: Utilizes URLSession with async/await and structured concurrency for efficient data handling.
- API Client Architecture: Offers protocol-based and closure-based client examples for testability and flexibility.
- Error Handling: Provides robust error types and strategies for handling network issues.
- Pagination: Demonstrates cursor-based and offset-based pagination for infinite scrolling and data fetching.
- Network Reachability: Explains how to monitor and react to network changes in your app.
- Configuring URLSession: Offers guidance on creating custom sessions for production use.
- App Transport Security (ATS): Ensures secure communication with ATS enforcement for HTTPS connections.
- Common Mistakes: Highlights common pitfalls and best practices to avoid them.
Quick Start
To get started, activate the 'ios-networking' skill and review the documentation for examples on using URLSession, handling network requests, and structuring your networking code.