未触发通知对于 iHealth BG5(BG5ConnectNot、BG5DisConnectNoti)

Notification is not get triggered For iHealth BG5 (BG5ConnectNot,BG5DisConnectNoti)

我们正在开发医疗保健 iOS 应用程序。我们正在处理 BLE 和非 BLE 蓝牙设备。同样,我们使用iHealth BG设备型号BG5读取血糖(BG),它是非BLE蓝牙设备。

iHealth 开发团队开发了一个 SDK 来从他们的设备读取测量值。他们与我们分享的副本。所以我们使用这个 SDK 从设备中获取数据。如前所述,BG5 设备用于测量血糖。 SDK 的实现类似于设备通信从设备连接通知开始。

我们注册了相同的 on view did appear 方法,它也反映在了 NSNoticationCenter 对象中。

像这样 BG5DisConnectNoti,0x1b19d6ff0,0x10100be70,1400
BG5ConnectNoti,0x1b19d6ff0,0x10100be70,1400

并这样注册

定义 BG5ConnectNoti @"BG5ConnectNoti" 定义 BG5DisConnectNoti @"BG5DisConnectNoti"

[[NSNotificationCenter defaultCenter] addObserver:self 选择器:@selector(deviceDidConnect:) name:BG5ConnectNoti object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self 选择器:@selector(deviceDidDisconnect:) name:BG5DisConnectNoti object:nil];

我认为通知是由 SDK 广播的。怎么调试才能知道SDK有没有广播?

有什么解决方案可以触发设备连接方法吗?

请帮忙解决这个问题。 在此先感谢您的支持。

我通过在信息 Plist 上添加一个条目来解决这个问题,以接收来自 BG5 设备的通知。

<key>UISupportedExternalAccessoryProtocols</key>
<array>
    <string>com.jiuan.BGV31</string>
</array>

"com.jiuan.BGV31" 这是 iHealth 向 apple 注册的外部附件协议 ID。

我从他们与 SDK 共享的演示项目中获得了这个。

问候 约瑟夫