---
title: "init(id:attributeElement:)"
framework: IOBluetooth
role: symbol
role_heading: Initializer
path: "iobluetooth/iobluetoothsdpserviceattribute/init(id:attributeelement:)-7oebi"
---

# init(id:attributeElement:)

Initializes a new service attribute with the given ID and data element.

## Declaration

```swift
init!(id newAttributeID: BluetoothSDPServiceAttributeID, attributeElement: IOBluetoothSDPDataElement!)
```

## Parameters

- `newAttributeID`: The attribute ID of the new service attribute.
- `attributeElement`: The data element of the new service attribute.

## Return Value

Return Value Returns self if successful. Returns nil if there was an error.

## See Also

### Initializers

- [init(id:attributeElementValue:)](iobluetooth/iobluetoothsdpserviceattribute/init(id:attributeelementvalue:)-84b3r.md)
