<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WiFiAware",
  "identifier" : "/documentation/WiFiAware/WAPublisherListener/Action/addingConnections(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Wi-Fi Aware"
    ],
    "preciseIdentifier" : "s:9WiFiAware19WAPublisherListenerV6ActionV17addingConnections4fromAeC7DevicesV_tFZ"
  },
  "title" : "addingConnections(from:)"
}
-->

# addingConnections(from:)

Makes additional network connections over a preexisting Wi-Fi Aware data path without publishing or advertising services over Wi-Fi Aware.

```
static func addingConnections(from pairedDevices: WAPublisherListener.Devices) -> WAPublisherListener.Action
```

## Parameters

`pairedDevices`

The remote devices from which to accept connections. The `NetworkListener` isn’t activated if the system doesn’t specify any devices.

## Return Value

A new `WAPublisherListener.Action` that configures the listener to accept network connections from specified paired devices.

## Discussion

Set up your app’s first connection to a device using Wi-Fi Aware service discovery. Apps can do so by defining a single “control” service used for initial discovery and connection, and creating a `NetworkListener` for that service via <doc://com.apple.documentation/documentation/WiFiAware/WAPublisherListener/Action/connecting(to:from:datapath:)>. Subsequent connections may then use a `.addingConnections` `NetworkListener` to quickly connect without going through the service discovery process again.

The framework limits the listener to accepting connections from the paired devices specified.

> Important: Your app must have at least one pre-existing <doc://com.apple.documentation/documentation/Network/NetworkConnection> to a remote device before it can make additional connections to an `.addingConnections NetworkListener` on that device.

```swift
// Create a listener to add new connections.
let listener = try NetworkListener(for:
            .wifiAware(.addingConnections(from: .matching(devices))),
        using: .parameters({
             TCP()
}))

// Get the port number once the listener is in the ready state.
guard let port = listener.port { return }

// Send the port number to the client device or devices over the control connection.
```

---

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)