<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.5.0"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetoothUI",
  "identifier" : "/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/discoverWithDeviceAttributes:serviceList:serviceRecord:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "IOBluetooth UI"
    ],
    "preciseIdentifier" : "c:objc(cs)IOBluetoothServiceBrowserController(im)discoverWithDeviceAttributes:serviceList:serviceRecord:"
  },
  "title" : "discoverWithDeviceAttributes:serviceList:serviceRecord:"
}
-->

# discoverWithDeviceAttributes:serviceList:serviceRecord:

Invoke an already created window controller to display, and run the modal dialog.

```
- (IOReturn) discoverWithDeviceAttributes:(IOBluetoothDeviceSearchAttributes *) deviceAttributes serviceList:(NSArray *) serviceArray serviceRecord:(IOBluetoothSDPServiceRecord **) outRecord;
```

## Parameters

`serviceArray`

A NSArray of valid UUIDs to allow. The array should contain NSData objects specifying the UUID to allow. We currently only support 16-bit short UUID forms, but will allow for any of the 16, 32 or full 128-bit UUID forms.

`outRecord`

Pointer to a (IOBluetoothSDPServiceRecord *) object. This will get allocated and returned to the client if the user selects a service.

## Return Value

IOReturn - * kIOReturnSuccess - on successful completion. * kCanceledErr - User canceled.

## Discussion

This method will run the IOBluetoothServiceBrowserController browser window as a sheet for the window passed to it in sheetWindow.

---

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)