<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/IOBluetoothSDPServiceRecord/getHandle(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "IOBluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)IOBluetoothSDPServiceRecord(im)getServiceRecordHandle:"
  },
  "title" : "getHandle(_:)"
}
-->

# getHandle(_:)

Allows the discovery of the service record handle assigned to the service.

```
func getHandle(_ outServiceRecordHandle: UnsafeMutablePointer<BluetoothSDPServiceRecordHandle>!) -> IOReturn
```

## Parameters

`outServiceRecordHandle`

A pointer to the location that will get the found service record handle.

## Return Value

Returns kIOReturnSuccess if the service record handle is found.

## Discussion

This method will search through the attributes to find the one representing the service record handle. If one is found the outServiceRecordHandle param is set with the value. The outServiceRecordHandle value only gets set when kIOReturnSuccess 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)