---
title: "connectionView(_:shouldDisplayDiscovered:withAdvertisementData:rssi:)"
framework: Playground Bluetooth
role: symbol
role_heading: Instance Method
platforms: [xcode 10.2+, swift playgrounds 2.0+]
path: playgroundbluetooth/playgroundbluetoothconnectionviewdelegate/3029525-connectionview
---

# connectionView(_:shouldDisplayDiscovered:withAdvertisementData:rssi:)

Tells the delegate that a new peripheral was discovered and can be displayed in the connection view.

## Declaration

```swift
func connectionView(_ connectionView: PlaygroundBluetoothConnectionView, shouldDisplayDiscovered peripheral: CBPeripheral, withAdvertisementData advertisementData: [String : Any]?, rssi: Double) -> Bool
```

## Parameters

- `connectionView`: The connection view showing available peripherals.
- `peripheral`: The newly discovered peripheral.
- `advertisementData`: The advertisement data you use to help decide whether or not to display the peripheral.
- `rssi`: The current received signal strength indicator of the peripheral in decibels.

## Return Value

Return Value A Boolean value indicating whether the newly discovered peripheral should show up in the connection view.

## See Also

### Displaying New Peripherals

- [connectionView(_:shouldConnectTo:withAdvertisementData:)](playgroundbluetooth/playgroundbluetoothconnectionviewdelegate/3029523-connectionview.md)
- [connectionView(_:titleFor:)](playgroundbluetooth/playgroundbluetoothconnectionviewdelegate/3029527-connectionview.md)
