Create network connections to send and receive data using transport and security protocols.


Use this framework when you need direct access to protocols like TLS, TCP, and UDP for your custom application protocols. Continue to use URLSession, which is built upon this framework, for loading HTTP- and URL-based resources.


Connections and Listeners

class NWConnection

A bidirectional data connection between a local endpoint and a remote endpoint.

class NWListener

An object you use to listen for incoming network connections.

enum NWEndpoint

An endpoint in a network connection.

class NWParameters

An object that stores the protocols to use for connections, options for sending data, and network path constraints.

Paths and Monitors

struct NWPath

An object that contains information about the properties of the network used by a connection, or that are available to your app.

class NWPathMonitor

An observer that you use to monitor and react to network changes.

Network Interfaces

struct NWInterface

A network interface used by a network connection to send and receive data.

Network Protocols

Types that define the identity of a protocol, the options to use at setup time, and the available dynamic properties.

class NWProtocol

The abstract superclass used by Network framework protocols and by custom network protocols that you define.

class NWProtocolDefinition

The abstract superclass for identifying a network protocol.

class NWProtocolMetadata

The abstract superclass for specifying metadata about a network protocol.

class NWProtocolOptions

The abstract superclass for configuring the options of a network protocol.

class NWProtocolIP

A network protocol you use for connections that use the Internet Protocol.

class NWProtocolTCP

A network protocol you use for connections that use the Transmission Control Protocol.

class NWProtocolUDP

A network protocol you use for connections that use the User Datagram Protocol.

class NWProtocolTLS

A network protocol you use for connections that use the Transport Layer Security protocol.


enum NWError

The errors thrown by the Network framework.

Network Debugging

Choosing a Network Debugging Tool

Decide which tool works best for your network debugging problem.

Debugging HTTP Server-Side Errors

Understand HTTP server-side errors and how to debug them.

Debugging HTTPS Problems with CFNetwork Diagnostic Logging

Use CFNetwork diagnostic logging to investigate HTTP and HTTPS problems.

Recording a Packet Trace

Learn how to record a low-level trace of network traffic.

Taking Advantage of Third-Party Network Debugging Tools

Learn about the available third-party network debugging tools.