<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceDiscoveryExtension",
  "identifier" : "/documentation/DeviceDiscoveryExtension/DDDevice/init(displayName:category:protocolType:identifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "DeviceDiscoveryExtension"
    ],
    "preciseIdentifier" : "c:objc(cs)DDDevice(im)initWithDisplayName:category:protocolType:identifier:"
  },
  "title" : "init(displayName:category:protocolType:identifier:)"
}
-->

# init(displayName:category:protocolType:identifier:)

Creates an object that describes a discovered device.

```
init(displayName: String, category: DDDevice.Category, protocolType: UTType, identifier: String)
```

## Parameters

`displayName`

A name for the device to display to the user.

`category`

An option that determines the icon that the picker UI displays for the device.

`protocolType`

A custom universal type that describes the device’s manner of communication with the extension.

`identifier`

A unique identifier for the device.

## Discussion

As an example `identifier` for Bluetooth devices, your extension can use the device’s local name (see <doc://com.apple.documentation/documentation/CoreBluetooth/CBAdvertisementDataLocalNameKey>).

---

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)