<!--
{
  "availability" : [
    "macOS: 10.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetoothUI",
  "identifier" : "/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "IOBluetooth UI"
    ],
    "preciseIdentifier" : "c:objc(cs)IOBluetoothServiceBrowserController"
  },
  "title" : "IOBluetoothServiceBrowserController"
}
-->

# IOBluetoothServiceBrowserController

A NSWindowController subclass to display a window to search for and perform SDP queries on bluetooth devices within range.

```
class IOBluetoothServiceBrowserController
```

## Overview

This NSWindowController subclass will bring up a generic Bluetooth search and SDP browsing window allowing the user to find devices within range, perform SDP queries on a particular device, and select a SDP service to connect to. The client application can provide NSArrays of valid service UUIDs to allow, and an NSArray of valid device types to allow. The device type filter is not yet implemented.

## Topics

### Initializers

[`+  serviceBrowserController:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/init(_:))

Allocator work Bluetooth Service Browser window controller.

### Instance Methods

[`-  addAllowedUUID:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/addAllowedUUID(_:))

Adds a UUID to the list of UUIDs that are used to validate the user’s selection.

[`-  addAllowedUUIDArray:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/addAllowedUUIDArray(_:))

Adds an array of UUIDs to the list of UUIDs that are used to validate the user’s selection.

[`-  beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/beginSheetModal(for:modalDelegate:didEnd:contextInfo:))

Runs the service browser panel as a sheet on the target window.

[`-  clearAllowedUUIDs`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/clearAllowedUUIDs())

Resets the controller back to the default state where it will accept any device the user selects.

[`-  getDescriptionText`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/getDescriptionText())

Returns the description text that appears in the device selector panel.

[`-  getOptions`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/getOptions())

Returns the option bits that control the panel’s behavior.

[`-  getPrompt`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/getPrompt())

Returns the title of the default/select button in the device selector panel.

[`-  getServiceBrowserControllerRef`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/getRef())

Returns an IOBluetoothServiceBrowserControllerRef representation of the target IOBluetoothServiceBrowserController object.

[`-  getResults`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/getResults())

Returns the result of the user’s selection.

[`-  getSearchAttributes`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/getSearchAttributes())

Returns the search attributes that control the panel’s search/inquiry behavior.

[`-  getTitle`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/getTitle())

Returns the title of the device selector panel.

[`-  runModal`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/runModal())

Runs the service browser panel in a modal session to allow the user to select a service on a Bluetooth device.

[`-  setDescriptionText:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/setDescriptionText(_:))

Sets the description text that appears in the device selector panel.

[`-  setOptions:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/setOptions(_:))

Modify the options for the window controller.

[`-  setPrompt:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/setPrompt(_:))

Sets the title of the default/select button in the device selector panel.

[`-  setSearchAttributes:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/setSearchAttributes(_:))

Sets the search attributes that control the panel’s search/inquiry behavior.

[`-  setTitle:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/setTitle(_:))

Sets the title of the panel when not run as a sheet.

[`-  discover:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/discover:)

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

[`-  discoverAsSheetForWindow:withRecord:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/discoverAsSheetForWindow:withRecord:)

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

[`-  discoverWithDeviceAttributes:serviceList:serviceRecord:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/discoverWithDeviceAttributes:serviceList:serviceRecord:)

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

### Type Methods

[`+  withServiceBrowserControllerRef:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/withServiceBrowserControllerRef(_:))

Method call to convert an IOBluetoothServiceBrowserControllerRef into an IOBluetoothServiceBrowserController *.

[`+  browseDevices:options:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/browseDevices:options:)

[`+  browseDevicesAsSheetForWindow:options:window:`](/documentation/IOBluetoothUI/IOBluetoothServiceBrowserController/browseDevicesAsSheetForWindow:options:window:)

## Relationships

### Conforms To

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSSeguePerforming`](/documentation/AppKit/NSSeguePerforming)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

### Inherits From

[`NSWindowController`](/documentation/AppKit/NSWindowController)

---

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)