Post

Replies

Boosts

Views

Activity

Reply to Inconsistency Between Mac and iOS With Core Bluetooth
I found your post by searching for kCBScanOptionAppleFilterPuckType, which I discovered by debugging a similar simple-as-I-could-make-it BLE scanner. My motivation is to learn about the CoreBluetooth API before embarking on a serious app development, nothing more, but the water got deep quickly. In the documentation, there are only 8 AdvertisementKeys - CBAdvertisementDataLocalNameKey ... and so on. But my switch statement, which had a case for every key, kept falling through to the default. I start printing them to the console, and I find 2 undocumented ones: kCBAdvDataChannel and kCBAdvDataAppleMfgData. After a bit of messing about, I find that the kCBAdvDataChannel keys to a value of type NSNumber which looks like an integer, stuck at 37. The other key has a Dictionary for a value, with a single entry, with key kCBScanOptionAppleFilterPuckType. I search for that, and I get here. Not sure any of this helps very much, but I echo your desire for consistent behavior between platforms, and add a plea for up-to-date documentation. I'll add more here as I figure it out. All of my stuff done on MacOS 11.1 on a 2016 MacBook Pro.
Jan ’21