Network.framework is Apple's modern networking API for TCP/UDP connections, replacing BSD sockets with smart connection establishment, user-space networking, and seamless mobility handling.
ALWAYS load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake.
| Getting Started | Setting up NWConnection for TCP/UDP, choosing between APIs | | Connection States | Handling .waiting, .ready, .failed transitions | | iOS 26+ Networking | Using NetworkConnection with async/await, TLV framing, Coder protocol | | Migration Guide | Moving from sockets, CFSocket, SCNetworkReachability, URLSession |
Da utilizzare durante l'implementazione di connessioni Network.framework (NWConnection, NetworkConnection), il debug di errori di connessione, la migrazione da flussi socket/URLSession o la gestione delle transizioni di rete. Copre i modelli UDP/TCP, le reti di concorrenza strutturata (iOS 26+) e gli anti-pattern comuni. Fonte: johnrogers/claude-swift-engineering.