Skip to content
liuyanwei edited this page Oct 16, 2015 · 19 revisions

=======================添加当前扫描到的设备变化的委托 =======================增加对rssi的支持

  • (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(nullable NSError *)error NS_DEPRECATED(NA, NA, 5_0, 8_0);
  • (void)peripheral:(CBPeripheral *)peripheral didReadRSSI:(NSNumber *)RSSI error:(nullable NSError *)error NS_AVAILABLE(NA, 8_0);

=======================完善代码中英文注释和方法注释 =======================去掉无用的变量 =======================修改babyBluetooch的子类类名 =======================增加对复杂操作的支持 =======================测试用例 =======================蓝牙桩程序 stub app of osx 1:添加重启设备功能 2:添加ui,点击进入教程,github蓝牙库 =======================支持断线重连 =======================peripheralManager的支持

当一系列操作后执行的方法

//方法声明
-(void)until:(void (^)())step
       then:(void(^)(CBCentralManager *manager,CBPeripheral *peripheral))then;
-(void)until:(void (^)())step
        step:(void (^)())step;
//方法调用

 [baby 
     until:^() {
        //获取characteristic
        fetchC(characteristicc1,"ff01");
        //characteristic write操作
        writeC(characteristicc1,"ff01");
        writeC(characteristicc2,characteristicc1);
        //检查是否写成功,默认write就会检查是否写成功
        ckeckValueEqual(characteristicc1,characteristicc2);
        //check Block检查

        
     }
     then:^(CBCentralManager *manager,CBPeripheral *peripheral) {
        //do when step done
        notity(c3,c4,onBlock());
     }
 ];

 [baby until:^{
        //
    } step:^{
        //
    } then:^(CBCentralManager *manager, CBPeripheral *peripheral) {
        
  }];