<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWPathMonitor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network13NWPathMonitorC"
  },
  "title" : "NWPathMonitor"
}
-->

# NWPathMonitor

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

```
final class NWPathMonitor
```

## Topics

### Creating Path Monitors

[`init()`](/documentation/Network/NWPathMonitor/init())

Initializes a path monitor to observe all available interface types.

[`init(requiredInterfaceType: NWInterface.InterfaceType)`](/documentation/Network/NWPathMonitor/init(requiredInterfaceType:))

Initializes a path monitor to observe a specific interface type.

[`init(prohibitedInterfaceTypes: [NWInterface.InterfaceType])`](/documentation/Network/NWPathMonitor/init(prohibitedInterfaceTypes:))

Initializes a path monitor to observe interface types that are not explicitly prohibited.

[`func start(queue: DispatchQueue)`](/documentation/Network/NWPathMonitor/start(queue:))

Starts monitoring path changes, and sets a queue on which to deliver path events.

[`var queue: DispatchQueue?`](/documentation/Network/NWPathMonitor/queue)

The queue on which path events are delivered.

### Handling Path Updates

[`var currentPath: NWPath`](/documentation/Network/NWPathMonitor/currentPath)

The currently available network path observed by the path monitor.

[`var pathUpdateHandler: ((NWPath) -> Void)?`](/documentation/Network/NWPathMonitor/pathUpdateHandler)

A handler that receives network path updates.

### Canceling Path Monitors

[`func cancel()`](/documentation/Network/NWPathMonitor/cancel())

Stops receiving network path updates.

### Structures

[`struct Iterator`](/documentation/Network/NWPathMonitor/Iterator)

### Type Properties

[`static var ethernetChannel: NWPathMonitor`](/documentation/Network/NWPathMonitor/ethernetChannel)

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Copyable`](/documentation/Swift/Copyable)

[`AsyncSequence`](/documentation/Swift/AsyncSequence)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)