小编Ben*_*ver的帖子

在调用蓝牙附件选取器完成块之前,EAAccessoryDidConnectNotification不会触发

我最近开始使用这种EAAccessoryManager showBluetoothAccessoryPickerWithNameFilter方法,以便在我们的应用程序启动时连接到我们的MFI蓝牙配件(如果它还没有连接).我遇到了以下情况:

  1. 附件已关闭
  2. 用户启动应用程序
  3. 显示附件选择器
  4. 用户启动附件(之前已配对,因此重新连接)
  5. 继续显示附件选择器,并且EAAccessoryDidConnectNotification在用户通过按"取消"取消附件选择器之前,应用程序不会收到.

在我上面已经解释的情况下,即使我们连接到我们定义的附件NSPredicate,选择器也会挂起,我们不会收到附件已连接的通知,直到调用拾取器的完成块为止.用户有点陷入困境.

我们正在运行iOS 7.1.1并已针对7.1和7.0进行了测试.

任何帮助,将不胜感激.这是一些显示我所看到的日志:

2014-04-28 12:03:48.028 App[508:60b] BTM: attaching to BTServer
2014-04-28 12:03:48.262 App[508:60b] BTM: setting pairing enabled
2014-04-28 12:03:55.578 App[508:60b] BTM: attempting to connect to service 0x00000001 on device "Accessory-10" 00:07:80:79:92:8D
2014-04-28 12:03:55.966 App[508:60b] BTM: connection to service 0x00000001 on device "Accessory-10" 00:07:80:79:92:8D succeeded
2014-04-28 12:03:55.991 App[508:60b] BTM: attempting to connect to service 0x00000080 on device "Accessory-10" 00:07:80:79:92:8D
2014-04-28 12:03:56.024 App[508:60b] BTM: connection to service 0x00000080 …
Run Code Online (Sandbox Code Playgroud)

bluetooth ios eaaccessory

5
推荐指数
0
解决办法
1202
查看次数

标签 统计

bluetooth ×1

eaaccessory ×1

ios ×1