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

# performSDPQuery(_:uuids:)

Performs an SDP query on the target device with the specified service UUIDs.

```
func performSDPQuery(_ target: Any!, uuids uuidArray: [Any]!) -> IOReturn
```

## Parameters

`target`

The target to message when the SDP query is complete

`uuidArray`

An array of IOBluetoothSDPUUID objects for each service the caller is interested in

## Return Value

Returns kIOReturnSuccess if the SDP query was successfully started.

## Discussion

As a result of this call, a baseband connection will be built to the device (if not already connected). Then, an L2CAP channel will be opened to the SDP server on the device. At that point, a Service Search Attribute request will be issued for each service UUID specified in the UUID array.

This function is always asynchronous. If a target is specified, when the SDP query is complete (or an error is encountered), the method -sdpQueryComplete:status: will be called on the given target. If no target is specified, the request is still asynchronous, but no callback will be made. That can be useful if the client has registered for SDP service changed notifications.

---

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)