---
title: "getAttributeDataElement(_:)"
framework: IOBluetooth
role: symbol
role_heading: Instance Method
path: "iobluetooth/iobluetoothsdpservicerecord/getattributedataelement(_:)"
---

# getAttributeDataElement(_:)

Returns the data element for the given attribute ID in the target service.

## Declaration

```swift
func getAttributeDataElement(_ attributeID: BluetoothSDPServiceAttributeID) -> IOBluetoothSDPDataElement!
```

## Parameters

- `attributeID`: The attribute ID of the desired attribute.

## Return Value

Return Value Returns the data element for the given attribute ID in the target service. If the service does not contain an attribute with the given ID, then nil is returned.
