Bluetooth Low Energy advertising to be discoverable in iOS Settings

给你一囗甜甜゛ 提交于 2019-12-20 04:24:38

问题


I have an iOS app which is using CBPeripheralManager to implement a peripheral. I start advertising with the command:

 [self.peripheralManager startAdvertising:@{CBAdvertisementDataLocalNameKey : @"MY_DEVICE_NAME"}];

According to the Apple docuentation, https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheralManager_Class/index.html#//apple_ref/occ/instm/CBPeripheralManager/startAdvertising:

only two of the keys are supported for peripheral manager objects: CBAdvertisementDataLocalNameKey and CBAdvertisementDataServiceUUIDsKey

My issue is that I want this peripheral to be discoverable in the Settings -> Bluetooth area of iOS settings. At present it is only discoverable via an app and the CBCentralManager scanForPeripheralsWithServices API call. Do I need to add a data service to make it discoverable via iOS settings ?


回答1:


Bluetooth Low Energy devices are not discoverable in the Settings->Bluetooth page. This is only for Bluetooth 2.1/3.0 devices such as keyboards and headsets/handsfree devices.

A Bluetooth Low Energy peripheral is only discoverable by an app using Core Bluetooth.



来源:https://stackoverflow.com/questions/27211573/bluetooth-low-energy-advertising-to-be-discoverable-in-ios-settings

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