<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/IOBluetoothSDPUUID/init(bytes:length:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "IOBluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)IOBluetoothSDPUUID(cm)uuidWithBytes:length:"
  },
  "title" : "init(bytes:length:)"
}
-->

# init(bytes:length:)

Creates a new IOBluetoothSDPUUID object with the given bytes of the given length.

```
convenience init!(bytes: UnsafeRawPointer!, length: UInt32)
```

## Parameters

`bytes`

An array of bytes representing the UUID.

`length`

The length of the array of bytes.

## Return Value

Returns the new IOBluetoothSDPUUID object or nil on failure.

## Discussion

If the length is invalid for a UUID, nil is returned.

---

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)