How to get the list of the paired devices through Bluetooth in iOS?

家住魔仙堡 提交于 2019-12-04 03:47:27

问题


It's for AppStore, so I don't want any private framework.

I want to get the list of the paired(even not connected).

There are Core Bluetooth and External Accessary frameworks in iOS. I tried both of these, but nothing listed.


回答1:


Tyr to use this one but i'm not sure its working or not for offline devices.

Create EAAccessory object and initialize it. And then call the property name on your accessory object

NSArray *accessories = [[EAAccessoryManager sharedAccessoryManager] 
                        connectedAccessories]; 
EAAccessory *accessory = nil; 

for (EAAccessory *obj in accessories)
{ 
    NSLog(@"Found accessory named: %@", obj.name);
}


来源:https://stackoverflow.com/questions/17021233/how-to-get-the-list-of-the-paired-devices-through-bluetooth-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!