这个问题已经在 2013 年在 Stack Overflow上提出过,但需要更新。自 macOS 10.13 以来,针对 macOS 的核心蓝牙功能进行了更改,使其更加符合 iOS。
\n该问题的答案是
\n\n\nCoreBluetooth 是用于蓝牙 LE 通信的 iOS 框架。IOBluetooth 是一个 OS X 框架
\n
这已经不再是事实了,Core Bluetooth 不只是iOS 框架,尽管 IOBluetooth是macOS独有的
\n\n\nCoreBluetooth 用于访问低功耗蓝牙 API。IOBluetooth 用于蓝牙经典接口
\n
这也是不正确的,因为核心蓝牙并非专门用于 BLE。
\nCoreBluetooth 文档指出:
\n\n\n与蓝牙低功耗和 BR/EDR (\xe2\x80\x9cClassic\xe2\x80\x9d) 设备通信。
\n
这看起来很简单;核心蓝牙用于蓝牙通信,包括 BLE 和 Classic。
\nIOBluetooth 文档指出:
\n\n\n获得对蓝牙设备的用户空间访问。
\n
但这并不是特别有启发性。
\n在 macOS 10.13+ 上的 CoreBluetooth …