BabyBluetooth-swift icon indicating copy to clipboard operation
BabyBluetooth-swift copied to clipboard

puzzle

Open ggdkay opened this issue 8 years ago • 1 comments

.cancelAllPeripheralsConnection() .scanForPeripherals() .enjoy() ` connect ble device once

.cancelAllPeripheralsConnection() .scanForPeripherals() .begin() .having(currentConnectedPeripheral).connectToPeripherals().discoverServices().discoverCharacteristics().readValueForCharacteristic().begin()

` but methods will connect twice,that make me confused,can you solve my puzzle Thanks!

ggdkay avatar May 20 '16 01:05 ggdkay

there has some problem in you code.

  • 1: if you use having(currentConnectedPeripheral) method ,you no need use .scanForPeripherals(), it's immediate cause you connect twice.
  • 2: begin() only use in end of the method 's chain, only once

coolnameismy avatar May 24 '16 11:05 coolnameismy