2

iOS, swift How to check "whether there is any Bluetooth device in range of iPhone - Yes or No" . In other words, to check whether the iPhone can find any Bluetooth-RSSI.

Note this question is not checking "connected/disconnected Bluetooth" device. This question is finding whether there is any bluetooth device in the range. Connection is not the concern.

I understand the question seems quite familiar and classic and maybe even simple, but indeed I did not find answer after research. Any help ? Thanks Bill

PS 1 : I tried to use

 func centralManager(central: CBCentralManager!, didDiscoverPeripheral peripheral: CBPeripheral!, advertisementData: [NSObject : AnyObject]!, RSSI: NSNumber!) { \\check Bluetooth device }

, but unfortunately , the function is simply bypassed when there is no Bluetooth device in range, because RSSI (as the input of the function) does not exist at all when there is no BL device in range.

PS 2: I tried "Get bluetooth devices in range with SWIFT 1" but it seems it only works for OS X while not iOS. Anyway, it does not answer my question.

Ancalagon BerenLuthien
  • 1,154
  • 6
  • 20
  • 29

0 Answers0