<!--
{
  "availability" : [
    "iOS: 26.2.0 -",
    "iPadOS: 26.2.0 -",
    "macCatalyst: 26.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WiFiInfrastructure",
  "identifier" : "/documentation/WiFiInfrastructure/WINetworkSharingProvider/networkEvents(matching:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Wi-Fi Infrastructure"
    ],
    "preciseIdentifier" : "s:18WiFiInfrastructure24WINetworkSharingProviderC13networkEvents8matchingQr10Foundation9PredicateVyAC7NetworkV_QPGSg_tF"
  },
  "title" : "networkEvents(matching:)"
}
-->

# networkEvents(matching:)

Returns an async sequence of network events, containing current shared networks and future updates.

```
func networkEvents(matching predicate: Predicate<WINetworkSharingProvider.Network>? = nil) -> some Sendable & AsyncSequence<WINetworkSharingProvider.NetworkEvent, any Error>
```

## Parameters

`predicate`

An optional predicate for filtering the shared networks list. The default is `nil`, meaning
you receive all networks.

## Return Value

An async sequence that delivers [`WINetworkSharingProvider.NetworkEvent`](/documentation/WiFiInfrastructure/WINetworkSharingProvider/NetworkEvent) instances whenever
your app extension needs to update its network information or present UI.

## Discussion

Use this method to monitor changes to the shared networks list and respond to system events, like
new network availability or sharing requests from your container app.

---

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)