How to get device Bluetooth address on OS X?
I've looked over the IOBluetooth framework what feels like a dozen times, but I can't for the life of me find a way to retrieve the Bluetooth device address for the current device. I've written an 开发者_Go百科application that scans for devices in range utilizing IOBluetoothDeviceInquiry, but this doesn't seem to offer up the address of the device doing the scanning.
How might this be accomplished programatically? (Without opening up System Profiler)
[[IOBluetoothHostController defaultController] addressAsString]
or getAddress:
if you want a BluetoothDeviceAddress
.
精彩评论