<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NearbyInteraction",
  "identifier" : "/documentation/NearbyInteraction/NINearbyAccessoryConfiguration/init(accessoryData:bluetoothPeerIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Nearby Interaction"
    ],
    "preciseIdentifier" : "c:objc(cs)NINearbyAccessoryConfiguration(im)initWithAccessoryData:bluetoothPeerIdentifier:error:"
  },
  "title" : "init(accessoryData:bluetoothPeerIdentifier:)"
}
-->

# init(accessoryData:bluetoothPeerIdentifier:)

Creates a configuration for an accessory with the given Bluetooth peer identifier.

```
init(accessoryData: Data, bluetoothPeerIdentifier identifier: UUID) throws
```

## Parameters

`accessoryData`

The accessory’s configuration data formatted to the [Ultra Wideband (UWB) third-party device specification](https://developer.apple.com/nearby-interaction).

`identifier`

The accessory’s Bluetooth peer identifier. For more information, see <doc://com.apple.documentation/documentation/CoreBluetooth/CBPeer> <doc://com.apple.documentation/documentation/CoreBluetooth/CBPeer/identifier>.

## Discussion

Use this initializer when your app interacts with a Bluetooth accessory that’s paired to the device to enable interaction while your app is in the background.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)