简体   繁体   English

如何通过Swift中的蓝牙获取附近的iPhone和Android设备列表?

[英]How to get nearby iPhone and Android device list by bluetooth in Swift?

I am trying to find a nearby iPhone and Android device by CoreBluetooth.Framework .我正在尝试通过CoreBluetooth.Framework找到附近的iPhoneAndroid设备。 Somehow I am only able to get a watch and laptop devices.不知何故,我只能获得手表和笔记本电脑设备。 for others, I am getting only an "Unknown device" I am referring to https://github.com/iqvis/BLEManager-iOS link to get the device list.对于其他人,我只得到一个“未知设备”,我指的是https://github.com/iqvis/BLEManager-iOS链接来获取设备列表。

Try below links in your code:在您的代码中尝试以下链接:

[1] You can use Ble3Framework.framework to scan devices and it provides ZeronerBlePeripheral classes and delegates to get list of near by device. [1] 您可以使用 Ble3Framework.framework 来扫描设备,它提供 ZeronerBlePeripheral 类和委托来获取设备附近的列表。

here is link from where you can download the example and sdk for iOS and Android:这里是您可以下载示例和 iOS 和 Android 的示例和 sdk 的链接:

http://api6.iwown.com/devcenter/tutorial.html

http://api6.iwown.com/devcenter/home.html

[2] Example here:https://github.com/androidthings/sample-bluetooth-le-gattserver If you implement the Android app then iOS app will discover the service. [2] 此处的示例:https://github.com/androidthings/sample-bluetooth-le-gattserver如果您实现 Android 应用程序,则 iOS 应用程序将发现服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM