【问题标题】:Get name of bluetooth connected device to ipad将蓝牙连接设备的名称获取到 ipad
【发布时间】:2016-06-15 10:05:36
【问题描述】:

任何 iOS 设备都可以连接到任何其他设备的蓝牙网络共享,无论是 Android 还是 Mac 任何设备。因此,当 iOS 设备连接到蓝牙网络共享时,在设置应用程序中我们可以看到该设备的名称已连接。我只想要在我的应用程序中连接的蓝牙名称。有什么方法可以获取连接的蓝牙名称?蓝牙可能是也可能不是 BLE。

【问题讨论】:

标签: ios objective-c ipad bluetooth ios-bluetooth


【解决方案1】:

在您的代码中执行以下操作。在获取设备列表之前,您必须在 iPad 设置中配对这些设备。

EAAccessoryManager *manager = [EAAccessoryManager sharedAccessoryManager];
NSMutableArray *bluetoothPrinters = [[NSMutableArray alloc] initWithArray:manager.connectedAccessories];

【讨论】:

    【解决方案2】:

    你必须使用CoreBluetooth framework

    即将从 iOS 设备连接到 BLE 设备

    并检查此链接:

    http://www.raywenderlich.com/52080/introduction-core-bluetooth-building-heart-rate-monitor

    【讨论】:

      猜你喜欢
      • 2018-10-18
      • 2014-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多