【问题标题】:Testing Core Bluetooth Applications in the iOS Simulator在 iOS 模拟器中测试核心蓝牙应用程序
【发布时间】:2021-10-20 08:01:26
【问题描述】:

我有一个关于在 iOS 模拟器中使用 BLE 的问题。

我按照以下说明使用 BLE 设置 XCode 模拟器:http://developer.apple.com/library/ios/#technotes/tn2295/_index.html

我在带有内置 BLE 和 CSR USB BLE Dongle 的 VMware 机器上使用 Mac os 11.6 big sur 和 Xcode 12.5。 Mac OS X 发现 USB 加密狗,因为它显示在系统信息中。

然后我输入这个命令:

sudo nvram bluetoothHostControllerSwitchBehavior="never"

重新拥有 Broadcom 芯片并且蓝牙配置未出现在 ios 模拟器设置应用程序中且不可用。

那么这里有什么问题呢?

感谢您的帮助!

Bluetooth info, Simulator Setting App

【问题讨论】:

    标签: ios xcode xamarin bluetooth bluetooth-lowenergy


    【解决方案1】:

    不幸的是,问题在于 technote 是古老的。

    在 iOS 7 中从模拟器中删除了 BLE 支持

    您需要使用真机调试 Core Bluetooth iOS 应用程序。

    Core Bluetooth 在 iOS 和 macOS 之间确实具有一致的 API,因此您可以在 Mac 应用程序中尝试一些代码,然后将其传输到您的 iOS 应用程序,但对于最终测试,您需要使用 iOS 设备。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-23
      • 2011-03-26
      • 2014-11-25
      • 2017-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多