---
title: "centralManager(_:willConnectTo:)"
framework: Playground Bluetooth
role: symbol
role_heading: Instance Method
platforms: [xcode 10.2+, swift playgrounds 2.0+]
path: playgroundbluetooth/playgroundbluetoothcentralmanagerdelegate/3029482-centralmanager
---

# centralManager(_:willConnectTo:)

Tells the delegate that the central manager is about to attempt to establish a connection with a peripheral.

## Declaration

```swift
func centralManager(_ centralManager: PlaygroundBluetoothCentralManager, willConnectTo peripheral: CBPeripheral)
```

## Parameters

- `centralManager`: The central manager attempting the new connection.
- `peripheral`: The peripheral that the central manager is attempting to connect to.

## See Also

### Discovering Peripherals

- [centralManager(_:didDiscover:withAdvertisementData:rssi:)](playgroundbluetooth/playgroundbluetoothcentralmanagerdelegate/3029478-centralmanager.md)
- [centralManager(_:didConnectTo:)](playgroundbluetooth/playgroundbluetoothcentralmanagerdelegate/3029474-centralmanager.md)
