axiom-networking

Build and migrate Apple networking code using Network.framework and NetworkConnection.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-networking-pradeepmouli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-networking
Source: https://github.com/pradeepmouli/swift-template/tree/main/.agents/skills/axiom-networking
Command: npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-networking-pradeepmouli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers through designing, implementing, and migrating networking code to modern Apple frameworks, reducing reliance on deprecated APIs and avoiding common pitfalls like race conditions, main-thread blocking, and flaky reachability checks.

Core Features & Use Cases

  • Migration guidance for NWConnection to NetworkConnection (iOS 12-25 vs 26+)
  • Support for UDP and TCP/TLS with structured concurrency semantics
  • Framing and coder-based data exchange (TLV, Coder protocol) for clean, typed messages
  • Debugging patterns for network state handling, retries, and graceful transitions during network changes
  • Use cases spanning real-time apps, messaging, streaming, and custom protocols requiring low-level control

Quick Start

Instantiate a NetworkConnection to a target host and port, supply TLS if needed, and call start to establish the connection and begin data exchange.

Frequently Asked Questions about axiom-networking

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

FAQPage Schema
How do I migrate networking code from NWConnection to the new NetworkConnection API?

To migrate networking code from NWConnection to NetworkConnection, instantiate a NetworkConnection to a target host and port, supply TLS if needed, and call start. This ensures safe non-blocking operation and explicit state handling across iOS versions.

How does Network.framework handle TLS and structured concurrency for TCP connections?

Network.framework handles TLS and structured concurrency by integrating secure protocol negotiations and explicit state handling into TCP connections. This allows reliable, non-blocking network operations without encountering main-thread blocking issues.

Can I use Network.framework for UDP communications and TLV framing in real-time apps?

Yes, you can use Network.framework for UDP communications and TLV framing in real-time apps. It supports coder-based data exchange and typed messages, which are essential for messaging, streaming, and custom protocols.

What is the best way to debug network state transitions and error propagation in iOS?

The best way to debug network state transitions and error propagation is by implementing explicit state handling and graceful transitions during network changes. This avoids common pitfalls like race conditions and flaky reachability checks.

Does the NetworkConnection API support iOS 12 or is it limited to newer versions?

The NetworkConnection API supports apps running iOS 12 through iOS 26+. It provides specific migration guidance for transitioning from legacy NWConnection sockets to the updated NetworkConnection implementation.

Why does my legacy socket implementation cause main-thread blocking and race conditions?

Legacy socket implementations cause main-thread blocking and race conditions due to a lack of structured concurrency semantics and safe non-blocking operations. Migrating to NetworkConnection ensures explicit state handling and proper error propagation.