外部附件框架蓝牙对.每次计数的connectedAccessories 0 [英] External Accessory Framework bluetooth pair. connectedAccessories every time count 0

查看:217
本文介绍了外部附件框架蓝牙对.每次计数的connectedAccessories 0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想尝试用蓝牙读取/写入数据

I want try read/write data with bluetooth

我尝试配对:

Mac Book<-> iPod 4

Mac Book <-> iPod 4

自定义设备<-> iPod 4

custom device <-> iPod 4

我尝试了这个Apple示例(EADemo) https://developer.apple.com/library/ios/samplecode/EADemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010079

I try this Apple sample (EADemo) https://developer.apple.com/library/ios/samplecode/EADemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010079

我在设置->蓝牙中创建了一对:

I created pair in the settings->bluetooth:

Mac Book<-> iPod 4-好的(已连接)

Mac Book <-> iPod 4 - ok (connected)

自定义设备<-> iPod 4-确定(已连接)

custom device <-> iPod 4 - ok (connected)

但是

[[EAAccessoryManager sharedAccessoryManager] connectedAccessories]

总是获得计数为0的数组.

always get array with count 0.

有什么想法吗?

谢谢.

推荐答案

EADemo正在使用外部附件框架,因此需要将协议字符串添加到项目的info.plist中.这就是苹果用来锁定与非MFi配件的连接的方式. 有关更多信息,请查看 MFi程序

The EADemo is using the External Accessory framework and therefore needs a protocol string added into the info.plist of your project. This is what apple use to lock down connections to non MFi accessories. For more info check out the MFi program

这篇关于外部附件框架蓝牙对.每次计数的connectedAccessories 0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆