networking

Migrate iOS network connections from NWConnection to NetworkConnection using Network.framework.

1.1k|81|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/CharlesWiltgen/Axiom --skill networking-charleswiltgen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: networking
Source: https://github.com/CharlesWiltgen/Axiom/tree/main/.claude-plugin/plugins/axiom/skills/networking
Command: npx skills add https://github.com/CharlesWiltgen/Axiom --skill networking-charleswiltgen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guidance on using Network.framework, migrating from BSD sockets, avoiding anti-patterns, and adopting async/await patterns with iOS 26+.

Core Features & Use Cases

  • Anti-patterns to avoid (scenarios with SCNetworkReachability, blocking main thread, etc.).
  • Migration paths from older networking APIs to NetworkConnection.
  • Diagnostics and code reviews for networking implementations.

Quick Start

Compare NWConnection vsNetworkConnection and migrate a simple TLS client to the new API.

Frequently Asked Questions about networking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from NWConnection to NetworkConnection on iOS?

NetworkConnection is the modern iOS 26+ successor to NWConnection. Migration involves adopting async/await patterns, updating state management for the new API surface, and handling TLS configuration changes. The Skill provides step-by-step migration paths covering TCP/UDP transitions and cross-version compatibility from iOS 12 onwards.

What are common anti-patterns to avoid when implementing network connections on iOS?

Anti-patterns include using SCNetworkReachability for connection decisions, blocking the main thread with synchronous I/O, and improper reference handling causing memory leaks. This Skill identifies these pitfalls and demonstrates correct patterns for non-blocking I/O, robust state management, and graceful network transition handling.

Can I use Network.framework for peer-to-peer and real-time messaging apps?

Yes. Network.framework supports TCP/UDP, TLS encryption, and non-blocking I/O essential for gaming, streaming, messaging, and peer-to-peer applications. This Skill covers the architectural patterns, TLV framing, and Codable integration needed for these use cases.

How do I implement async/await patterns with network connections on iOS 26+?

Async/await replaces callback-based patterns in modern NetworkConnection APIs. This Skill shows how to structure async functions for connection lifecycle, data transmission, and error handling while maintaining proper reference semantics and state transitions.

What debugging techniques help diagnose Network.framework issues?

Network.framework provides diagnostic hooks for state monitoring, error propagation inspection, and connection lifecycle tracing. This Skill covers code review strategies and debugging practices to isolate connection failures, state management bugs, and protocol misconfigurations.