Contents

connectionView(_:shouldConnectTo:withAdvertisementData:)

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

Declaration

func connectionView(_ connectionView: PlaygroundBluetoothConnectionView, shouldConnectTo peripheral: CBPeripheral, withAdvertisementData advertisementData: [String : Any]?) -> 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.

Return Value

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

See Also

Displaying New Peripherals