---
title: "connecting(to:from:)"
framework: wifiaware
role: symbol
role_heading: Type Method
path: "wifiaware/wasubscriberbrowser/action/connecting(to:from:)"
---

# connecting(to:from:)

Subscribes to the provided service over Wi-Fi, providing browse results for connecting to the specified paired devices if available.

## Declaration

```swift
static func connecting(to pairedDevices: WASubscriberBrowser.Devices, from mySubscribingService: WASubscribableService) -> WASubscriberBrowser.Action
```

## Parameters

- `pairedDevices`: The devices to connect to. The browser isn’t activated if no devices are specified.
- `mySubscribingService`: The service to discover.

## Return Value

Return Value A new Action configuring this operation.

## Discussion

Discussion When subscribing, the NetworkBrowser provides a WAEndpoint for each discovered paired device, and the app can then create a NetworkConnection object to connect to each. Data path parameters including the WAPerformanceMode are set when creating the connection, using WAParameters written into the NWParameters for the NetworkConnection.
