Platforms to show: All Mac Windows Linux Cross-Platform

Back to IOBluetoothServiceBrowserControllerMBS class.

IOBluetoothServiceBrowserControllerMBS.addAllowedUUID(allowedUUID as IOBluetoothSDPUUIDMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds a UUID to the list of UUIDs that are used to validate the user's selection.

allowedUUID: UUID that a device may contain to be selected

The user's device selection gets validated against the UUIDs passed to addAllowedUUID or addAllowedUUIDArray. Each call to those methods essentially adds a filter that the selected device gets validated with. If any of the filters match, the device is considered valid. If they all fail, the device is not valid and the user is presented with an error code that the device does not support the required services. The UUID passed to addAllowedUUID is the only UUID that must be present in the device's SDP service records. Alternatively, all of the UUIDs in the UUID array passed to addAllowedUUIDArray must be present.
NOTE: This method is only available in macOS 10.2.4 (Bluetooth v1.1) or later.

IOBluetoothServiceBrowserControllerMBS.addAllowedUUIDArray(allowedUUIDs() as IOBluetoothSDPUUIDMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds an array of UUIDs to the list of UUIDs that are used to validate the user's selection.

allowedUUIDArray: An NSArray of UUIDs that all must be present in a device for it to be selectable.

The user's device selection gets validated against the UUIDs passed to addAllowedUUID or addAllowedUUIDArray. Each call to those methods essentially adds a filter that the selected device gets validated with. If any of the filters match, the device is considered valid. If they all fail, the device is not valid and the user is presented with an error code that the device does not support the required services. The UUID passed to addAllowedUUID is the only UUID that must be present in the device's SDP service records. Alternatively, all of the UUIDs in the UUID array passed to addAllowedUUIDArray must be present.
NOTE: This method is only available in macOS 10.2.4 (Bluetooth v1.1) or later.

IOBluetoothServiceBrowserControllerMBS.beginSheetModalForWindow(win as DesktopWindow, tag as variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 22.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Runs the service browser panel as a sheet on the target window.

sheetWindow: NSWindow to attach the service browser panel to as a sheet.
Tag is passed to event.

Sets lasterror to kIOReturnSuccess if the sheet modal session was started.

See also:

IOBluetoothServiceBrowserControllerMBS.beginSheetModalForWindow(win as window, tag as variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Runs the service browser panel as a sheet on the target window.

sheetWindow: NSWindow to attach the service browser panel to as a sheet.
Tag is passed to event.

Sets lasterror to kIOReturnSuccess if the sheet modal session was started.

See also:

IOBluetoothServiceBrowserControllerMBS.clearAllowedUUIDs

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Resets the controller back to the default state where it will accept any device the user selects.

This method is only available in macOS 10.2.4 (Bluetooth v1.1) or later.

IOBluetoothServiceBrowserControllerMBS.Constructor(options as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Allocator work Bluetooth Service Browser window controller.

Options: Bit field for options to set in the newly allocated controller. Currently no options are available.

IOBluetoothServiceBrowserControllerMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The destructor.

IOBluetoothServiceBrowserControllerMBS.Results as IOBluetoothSDPServiceRecordMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the result of the user's selection.

Returns an NSArray of IOBluetoothSDPServiceRecord objects corresponding to the user's selection. If the user cancelled the panel, nil will be returned.

There will only be results if the panel has been run, the user has successfully made a selection and that selection has been validated. If kIOBluetoothUISuccess was returned for the session, there should be valid results. Currently only a single device is allowed to be selected, so the results array will only contain one object. However in the future multiple selection will be supported.

This method is only available in macOS 10.2.4 (Bluetooth v1.1) or later.

IOBluetoothServiceBrowserControllerMBS.runModal as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Runs the service browser panel in a modal session to allow the user to select a service on a Bluetooth device.

Returns kIOBluetoothUISuccess if a successful, validated service selection was made by the user. Returns kIOBluetoothUIUserCanceledErr if the user cancelled the panel. These return values are the same as NSRunStoppedResponse and NSRunAbortedResponse respectively. They are the standard values used in a modal session.

The controller will use the panel attributes to filter what devices the user sees. The allowed UUIDs will be used to validate the selection the user makes. The user will only be able to select services that match the allowed UUIDs. Only when a selection has been validated (or the panel cancelled), will this method return.

NOTE: This method is only available in macOS 10.2.4 (Bluetooth v1.1) or later.

The items on this page are in the following plugins: MBS Bluetooth Plugin.


The biggest plugin in space...