title: iOS Swift : how to check whether there is Bluetooth device in range of iPhone
body: <p>iOS, swift
  How to check <strong>"whether there is any Bluetooth device in range of iPhone - Yes or No"</strong> . In other words, to check whether the iPhone can find any <strong>Bluetooth-RSSI</strong>. </p>
  
  <p>Note this question is not checking "connected/disconnected Bluetooth" device. This question is finding whether there is <strong>any</strong> bluetooth device in the range. Connection is not the concern.</p>
  
  <p>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</p>
  
  <p>PS 1 : I tried to use </p>
  
  <pre><code> func centralManager(central: CBCentralManager!, didDiscoverPeripheral peripheral: CBPeripheral!, advertisementData: [NSObject : AnyObject]!, RSSI: NSNumber!) { \\check Bluetooth device }
  </code></pre>
  
  <p>, 
  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.</p>
  
  <p>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. </p>