CBCentralManagerDelegate:didDiscoverPeripheral:AdvertiseData:在iOS 13中没有kCBAdvDataServiceUUID

时间:2019-08-23 07:13:40

标签: ios objective-c core-bluetooth ios13 cbcentralmanager

在iOS 13中,无法从方法中获取kCBAdvDataServiceUUIDs

-(void)centralManager: (CBCentralManager*)central didDiscoverPeripheral: (CBPeripheral*)peripheral advertisementData: (NSDictionary<NSString*, id>*)advertisementData RSSI: (NSNumber*)RSSI

但可以在iOS12.X中获得相同的结果。

iOS13

advertisementData : {
   kCBAdvDataIsConnectable = 1;
   kCBAdvDataLocalName = "Lock   67:7F:19";
   kCBAdvDataTimestamp = "588163242.820951";
   kCBAdvDataTxPowerLevel = 0;
}

注意:kCBAdvDataTimestamp仍未在iOS13上从Lockside进行广告,但是UUID已被进行广告,但仍未在adventData字典中显示。

iOS12

advertisementData : {
  kCBAdvDataIsConnectable = 1;
  kCBAdvDataLocalName = "Lock   67:7F:19";
  kCBAdvDataServiceUUIDs =     (
    "1F6B43AA-94DE-4BA9-981C-DA38823117BD"
  );
  kCBAdvDataTxPowerLevel = 0;
 }

0 个答案:

没有答案