ios-networking

Diagnose and remediate iOS networking issues across URLSession, WebSockets, and raw sockets.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

A centralized router for all networking tasks, including URLSession, Network.framework, and related diagnostics, to streamline networking work and debugging.

Core Features & Use Cases

  • Guidance for implementing HTTP requests, sockets, and network migrations
  • Debugging connection failures, TLS issues, and deprecated APIs
  • Clear decision paths for choosing the right networking approach

Quick Start

Prompt: "Implement an async URLSession data task with error handling."

Frequently Asked Questions about ios-networking

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

FAQPage Schema
How do I implement URLSession data tasks with async/await in iOS?

URLSession with async/await lets you handle HTTP requests concurrently without callbacks. Use `URLSession.shared.data(from:)` or `URLSession.data(from:delegate:)` to fetch data, decode responses, and manage errors in a linear, readable flow that integrates with Swift's structured concurrency model.

What's the difference between URLSession and Network.framework for iOS networking?

URLSession handles HTTP/HTTPS requests and higher-level protocols; Network.framework provides lower-level socket control for raw TCP/UDP, custom protocols, and fine-grained connection diagnostics. Choose URLSession for APIs and Network.framework when you need direct socket access or advanced connection monitoring.

How do I debug TLS handshake failures and connection timeouts in iOS?

TLS and timeout issues stem from certificate validation, protocol mismatches, or network latency. Use Network.framework's connection state monitoring, enable URLSession logging, inspect certificate chains, and verify server configuration. Test with explicit timeout values and retry logic to isolate root causes.

Can I migrate from deprecated networking APIs to URLSession and Network.framework?

Yes. Replace NSURLConnection with URLSession for HTTP tasks, and adopt Network.framework for socket-level work. Both support modern concurrency patterns. Migration paths include wrapping legacy code temporarily while refactoring incrementally to reduce risk and maintain compatibility.

How do I implement WebSocket connections and raw socket communication on iOS?

URLSessionWebSocketTask handles WebSocket protocols natively. For raw sockets, use Network.framework's NWConnection to establish TCP/UDP streams, manage send/receive cycles, and handle connection state changes. Both support async/await for structured concurrency.

What diagnostics should I run when network requests fail on iOS?

Check DNS resolution, TLS certificate validity, timeout thresholds, and connection state transitions. Use Network.framework's pathMonitor for reachability, enable URLSession request/response logging, and inspect error codes to distinguish network unavailability from application logic failures.