Open krutitrivedi opened 5 years ago
Describe the bug RxBluetoothNew[9350:1379211] [CoreBluetooth] API MISUSE: <CBCentralManager: 0x282f792c0> has no restore identifier but the delegate implements the centralManager:willRestoreState: method. Restoring will not be supported
i have following code :
func turnOn() throws { let echoID = CBUUID(string: "ec00") central = CentralManager() subscriptionToCharacteristic = central .observeState() .startWith(central.state) .filter { $0 == .poweredOn } .flatMap { _ in self.central.scanForPeripherals(withServices: [echoID]) } .take(1) .flatMap { $0.peripheral.establishConnection() } .flatMap { $0.discoverServices([echoID]) } .flatMap { Observable.from($0) } .flatMap { $0.discoverCharacteristics([echoID]) } .subscribe { [weak self] characteristics in self?.echoCharacteristic = characteristics.element?.first self?.subscriptionToCharacteristic = self?.echoCharacteristic? .observeValueUpdateAndSetNotification() .subscribe { self?.characteristicDidUpdateValue?(false, $0.element?.value) return } } }
Describe the bug RxBluetoothNew[9350:1379211] [CoreBluetooth] API MISUSE: <CBCentralManager: 0x282f792c0> has no restore identifier but the delegate implements the centralManager:willRestoreState: method. Restoring will not be supported
i have following code :
func turnOn() throws { let echoID = CBUUID(string: "ec00") central = CentralManager() subscriptionToCharacteristic = central .observeState() .startWith(central.state) .filter { $0 == .poweredOn } .flatMap { _ in self.central.scanForPeripherals(withServices: [echoID]) } .take(1) .flatMap { $0.peripheral.establishConnection() } .flatMap { $0.discoverServices([echoID]) } .flatMap { Observable.from($0) } .flatMap { $0.discoverCharacteristics([echoID]) } .subscribe { [weak self] characteristics in self?.echoCharacteristic = characteristics.element?.first self?.subscriptionToCharacteristic = self?.echoCharacteristic? .observeValueUpdateAndSetNotification() .subscribe { self?.characteristicDidUpdateValue?(false, $0.element?.value) return } } }