How to get list of names of available bluetooth devices in ios swift?
<p>this question is a replica of <a href="https://stackoverflow.com/questions/30636637/possible-to-generate-a-list-of-connected-bluetooth-devices-for-ios">this qustion</a></p>

<p>I have declared <code>CBCentralManagerDelegate</code> in my class and <code>var cb = CBCentralManager()</code></p>

<p>I set the delegate as <code>cb.delegate = self</code></p>

<p>I search the devices as <code>cb.scanForPeripheralsWithServices(nil, options: nil)</code></p>

<pre><code>func centralManager(central: CBCentralManager, didDiscoverPeripheral peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber) {
    print("\(advertisementData.description)")
}
</code></pre>

<p>I am able to print the details. But in the log I get data like this:</p>

<pre><code>["kCBAdvDataTxPowerLevel": 0, "kCBAdvDataLocalName": Smart Key, "kCBAdvDataManufacturerData": &lt;bc00&gt;, "kCBAdvDataServiceData": {
Battery = &lt;64&gt;;
}, "kCBAdvDataIsConnectable": 1]
</code></pre>

<p>All I want is the name of the device like: <code>My2Device</code></p>