Question: I am new to swift. I am not able to get a callback to centralManagerDidUpdateState:: w/ following in playground (i.e.: i thought initialization would call back into centralManagerDidUpdateState):

```
import CoreBluetooth
class BTDiscovery:NSObject,
CBCentralManagerDelegate {

    func centralManagerDidUpdateState(central: CBCentralManager!) {
        println("here")
    }
}

var bt = BTDiscovery()

```

---

Is Core Bluetooth supporting in the iOS Swift playground?
I tried this for OSX playground and IOBluetooth. This also didn't work. What am I doing wrong?

Thank you.

Answer: 
You can only use Core Bluetooth on an actual iOS device; it is not supported in the simulator, and by extension, it is not supported in a Playground as this is also executing on your Mac rather than on an iOS device.
It's possible to use Bluetooth in Swift Playground. Please note you have to use `PlaygroundBluetooth`. You can find more informations about it here [Documentation Framework PlaygroundBluetooth](https://developer.apple.com/documentation/playgroundbluetooth)

This is how you can scan using the central. 

```
let managerDelegate: PlaygroundBluetoothCentralManagerDelegate = <# manager delegate instance #>

let manager = PlaygroundBluetoothCentralManager(services: nil)
manager.delegate = managerDelegate

```

Please note `PlaygroundBluetooth` is just a subset of `CoreBluetooth` therefore you can not do everything which is normally possible in `CoreBluetooth`, but I think it's still great for simple things to have fun with.