---
title: "init(id:attributeElementValue:)"
framework: IOBluetooth
role: symbol
role_heading: Initializer
path: "iobluetooth/iobluetoothsdpserviceattribute/init(id:attributeelementvalue:)-84b3r"
---

# init(id:attributeElementValue:)

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

## Declaration

```swift
init!(id newAttributeID: BluetoothSDPServiceAttributeID, attributeElementValue: NSObject!)
```

## Parameters

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

## Return Value

Return Value Returns self if successful. Returns nil if there was an error parsing the element value.

## Discussion

Discussion See +[IOBluetoothSDPDataElement withElementValue:] for a description of the types that may be passed in as the attributeElementValue.

## See Also

### Initializers

- [init(id:attributeElement:)](iobluetooth/iobluetoothsdpserviceattribute/init(id:attributeelement:)-7oebi.md)
