---
title: "setItem(_:forPeripheral:)"
framework: Playground Bluetooth
role: symbol
role_heading: Instance Method
platforms: [xcode 10.2+, swift playgrounds 2.0+]
path: playgroundbluetooth/playgroundbluetoothconnectionview/3029517-setitem
---

# setItem(_:forPeripheral:)

Sets all of the information about the specified peripheral at once.

## Declaration

```swift
func setItem(_ item: PlaygroundBluetoothConnectionView.Item, forPeripheral peripheral: CBPeripheral)
```

## Parameters

- `item`: A doc://com.apple.documentation/documentation/playgroundbluetooth/playgroundbluetoothconnectionview/item that holds information about the specified peripheral.
- `peripheral`: The peripheral corresponding to the doc://com.apple.documentation/documentation/playgroundbluetooth/playgroundbluetoothconnectionview/item being displayed.

## See Also

### Displaying Peripherals

- [PlaygroundBluetoothConnectionView.Item](playgroundbluetooth/playgroundbluetoothconnectionview/item.md)
