Mac OSX Yosemite: Corebluetooth advertisement data missing CBAdvertisementDataLocalNameKey from iOS peripheral
| Originator: | apernix | ||
| Number: | rdar://19761186 | Date Originated: | 02/08/2015 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.10 |
| Classification: | Reproducible: |
Summary:
As of 10.10,
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI
does not contain the CBAdvertisementDataLocalNameKey advertised from a peripheral. I had the code working in 10.9, then when I updated to Yosemite advertisement data no longer contained the local name.
* My peripheral was an iOS device for my testing.
Steps to Reproduce:
1. Setup a peripheral from iOS with advertisement data containing CBAdvertisementDataLocalNameKey.
NSDictionary* advertisementData =
@{
CBAdvertisementDataLocalNameKey:[NSString stringWithFormat:@"STUFF%@", data]
};
[self.peripheralManager startAdvertising:advertisementData];
2. Setup an app with a central for Mac OS and start scanning:
[self.centralManager scanForPeripheralsWithServices:nil options:@{ CBCentralManagerScanOptionAllowDuplicatesKey : @NO }];
Expected Results:
Prior to 10.10, the advertisement data contained the local name in the advertisement data. The expected result is that the advertisement data is received.
Actual Results:
Advertisement data only contains 1 key:
{
kCBAdvDataIsConnectable = 1;
}
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!