External Accessory Framework bluetooth pair. conne

2019-08-04 17:57发布

I want try read/write data with bluetooth

I try pairs:

Mac Book <-> iPod 4

custom device <-> iPod 4

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 - ok (connected)

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

But

[[EAAccessoryManager sharedAccessoryManager] connectedAccessories]

always get array with count 0.

Any ideas?

Thanks.

1条回答
冷血范
2楼-- · 2019-08-04 18:18

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

查看更多
登录 后发表回答