BabyBluetooth-swift
BabyBluetooth-swift copied to clipboard
:baby: BabyBluetooth swift 版本,The easiest way to use Bluetooth (BLE )in ios,even bady can use. 简单易用的蓝牙库,基于CoreBluetooth的封装,并兼容ios和mac osx.
连接成功后 self.babyBluetooth.setBlockOnDiscoverCharacteristics({ peripheral, service, error in 这个方法不调用 func connectPeripheral(peripheral:CBPeripheral?){ self.babyBluetooth.cancelAllPeripheralsConnection() self.babyBluetooth.having(peripheral).then().connectToPeripherals().discoverServices().discoverCharacteristics().readValueForCharacteristic().discoverDescriptorsForCharacteristic().readValueForDescriptors().begin() // setBlockOnDiscoverToPeripherals }
小编,都2020年啦,等您的Swift😄
顶起来!!!!!!!!!!!!!!
when device connected at ios bt setting, can not receive connected ble device by babyBlutooth?
puzzle
.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!