pairedDeviceIdentifiers()
Category: Type Method
Platforms: iOS 15.0+, iPadOS 15.0+, Mac Catalyst 15.0+, visionOS 1.0+, watchOS 8.0+
Overview
Returns the UUIDs of the hearing device peripherals.
Declaration
static func pairedDeviceIdentifiers() -> [UUID]
Details
See Also
- Paired hearing devices
-
static let pairedUUIDsDidChangeNotification: NSNotification.Name
-
Accessibility
- AXMFiHearingDevice
- pairedDeviceIdentifiers()
paired Device Identifiers()
Return Value
An array of NSUUID objects that represent the Core Bluetooth UUIDs of the hearing device peripherals.
Discussion
This function returns each CBPeripheral with a manufacturer that matches the manufacturer in your app’s hearing.aid.app entitlement. For bimodal hearing devices, specify an array of manufacturers for this entitlement.
Find and connect to the matching hearing device peripherals like this:
let uuids = AXMFiHearingDevice.pairedDeviceIdentifiers()
let peripherals = bluetoothManager.retrievePeripherals(withIdentifiers: uuids)
for peripheral in peripherals where peripheral.state == .connected {
bluetoothManager.connect(peripheral)
}
Topics (Grouped)
Paired hearing devices
- letpairedUUIDsDidChangeNotification:NSNotification.Name — static; A notification that the system posts when there’s a change to the UUIDs of the hearing device peripherals.
Code Examples
static func pairedDeviceIdentifiers() -> [UUID]
let uuids = AXMFiHearingDevice.pairedDeviceIdentifiers()
let peripherals = bluetoothManager.retrievePeripherals(withIdentifiers: uuids)
for peripheral in peripherals where peripheral.state == .connected {
bluetoothManager.connect(peripheral)
}
Source: https://developer.apple.com/documentation/accessibility/axmfihearingdevice/paireddeviceidentifiers()