<!--
{
  "documentType" : "article",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/iobluetoothutilities-h",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "IOBluetoothUtilities.h"
}
-->

# IOBluetoothUtilities.h

See the Overview section above for header-level documentation.

## Discussion

#### Included Headers

- <stdio.h>
- <stdlib.h>
- <string.h>
- <sysexits.h>
- <sys/errno.h>
- <unistd.h>
- <IOBluetooth/Bluetooth.h>
- <IOKit/IOReturn.h>
- <IOBluetooth/IOBluetoothUserLib.h>

## Topics

### Miscellaneous

[`func IOBluetoothFindNumberOfRegistryEntriesOfClassName(UnsafePointer<CChar>!) -> Int`](/documentation/IOBluetooth/IOBluetoothFindNumberOfRegistryEntriesOfClassName(_:))

The number of registry entries with a device classname.

[`func IOBluetoothGetUniqueFileNameAndPath(String!, String!) -> String!`](/documentation/IOBluetooth/IOBluetoothGetUniqueFileNameAndPath(_:_:))

[`func IOBluetoothIsFileAppleDesignatedPIMData(String!) -> Bool`](/documentation/IOBluetooth/IOBluetoothIsFileAppleDesignatedPIMData(_:))

Apple designated PIM data is classified as: .vcard, .vcal, .vcf, .vnote, .vmsg, .vcs

[`func IOBluetoothNSStringFromDeviceAddress(UnsafePointer<BluetoothDeviceAddress>!) -> String!`](/documentation/IOBluetooth/IOBluetoothNSStringFromDeviceAddress(_:))

Convenience routine to take a device address structure and create an NSString.

[`func IOBluetoothNSStringToDeviceAddress(String!, UnsafeMutablePointer<BluetoothDeviceAddress>!) -> IOReturn`](/documentation/IOBluetooth/IOBluetoothNSStringToDeviceAddress(_:_:))

Convenience routine to take an NSString and turn it into a BluetoothDeviceAddress structure.

[`func IOBluetoothNumberOfAvailableHIDDevices() -> Int`](/documentation/IOBluetooth/IOBluetoothNumberOfAvailableHIDDevices())

Returns total number of HID devices on the system (Bluetooth + USB)

[`func IOBluetoothNumberOfKeyboardHIDDevices() -> Int`](/documentation/IOBluetooth/IOBluetoothNumberOfKeyboardHIDDevices())

Returns number of keyboard HID devices on the system (Bluetooth + USB)

[`func IOBluetoothNumberOfPointingHIDDevices() -> Int`](/documentation/IOBluetooth/IOBluetoothNumberOfPointingHIDDevices())

Returns number of “pointing” HID devices on the system (Bluetooth + USB)

[`func IOBluetoothNumberOfTabletHIDDevices() -> Int`](/documentation/IOBluetooth/IOBluetoothNumberOfTabletHIDDevices())

Returns number of “Tablet” HID devices on the system (Bluetooth + USB)

[`extern long IOBluetoothPackData(void *ioBuffer, const char *inFormat, ...);`](/documentation/IOBluetooth/IOBluetoothPackData)

Packs a variable amount of parameters into a buffer according to a printf-style format string.

[`extern long IOBluetoothUnpackData(ByteCount inBufferSize, const void *inBuffer, const char *inFormat, ...);`](/documentation/IOBluetooth/IOBluetoothUnpackData)

Unpacks a variable amount of data from a buffer into a variable number of parameters according to a printf-style format string.



---

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)