Trying to initialize a CBCentralManager in a Swift 4.2 project. Get the error shown in comment:
import CoreBluetooth
class SomeClass: NSObject, CBCentralManagerDelegate {
// Type of expression is ambiguous without more context
let manager: CBCentralManager = CBCentralManager(delegate: self, queue: nil)
// MARK: - Functions: CBCentralManagerDelegate
func centralManagerDidUpdateState(_ central: CBCentralManager) { }
}
If I switch self
out for nil
the error goes away, so I think I'm missing something important from my conformance to CBCentralManagerDelegate
...
Can I use the manager without a delegate; and if not, what do I need to do to resolve the error?