Question: I am trying to initialize a central manager instance to make an app with Bluetooth connectivity.

This is part of my code:

```
class ViewController: UIViewController, CBCentralManagerDelegate {
   var myCentralManager = CBCentralManager(delegate: self, queue: nil) //error on this line
   func centralManagerDidUpdateState(central: CBCentralManager!) { 
}

```

I get an error:

> 
> "Type 'ViewController -> () -> ViewController!' does not conform to protocol 'CBCentralManagerDelegate'
> 
> 
> 

The only method required by the protocol is `centralManagerDidUpdateState()` which I have added, so why do I get an error?

Answer: 
When you create a central manager, the central manager calls centralManagerDidUpdateState method of its delegate object. So you have to implement this delegate method to ensure that Bluetooth low energy is supported and available to use the central device. Like below:

```
func centralManagerDidUpdateState(central: CBCentralManager!){
    println("CentralManager is initialized")

    switch central.state{
    case CBCentralManagerState.Unauthorized:
        println("The app is not authorized to use Bluetooth low energy.")
    case CBCentralManagerState.PoweredOff:
        println("Bluetooth is currently powered off.")
    case CBCentralManagerState.PoweredOn:
        println("Bluetooth is currently powered on and available to use.")
    default:break
    }
}

```
I actually found a tricky workaround, as long as you already found some other's open source project which uses CBCentralManagerDelegate. (And it is not hard to find some open source projects that use CBCentralManagerDelegate)

Lets say in the open source project, "ViewController.swift" uses CBCentralManagerDelegate. 
In your project, you need "TESTViewController.swift" to use CBCentralManagerDelegate.

Now all you need to do is to 

Step 1, Copy (that is, drag) the ViewController.swift (which is from the open source project) to your project

Step 2, delete all lines in the ViewController.swift, which was just dragged to your project.

Step 3, If needed, rename it from ViewController.swift to TESTViewController.swift, and rename the class name as well.

Step 4, Now you can write your own code
"class TESTViewController: UIViewController, CBCentralManagerDelegate {...} "

Yeah, this might be silly, but it does work for my project quickly.