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 |
يُستخدم عند تنفيذ اتصالات Network.framework (NWConnection وNetworkConnection)، أو تصحيح أخطاء فشل الاتصال، أو الترحيل من تدفقات مآخذ التوصيل/URLSession، أو التعامل مع انتقالات الشبكة. يغطي أنماط UDP/TCP، والشبكات المتزامنة المنظمة (iOS 26+)، والأنماط المضادة الشائعة. المصدر: johnrogers/claude-swift-engineering.