I am developing a BLE peripheral app. By requirement, the advertising packet must contain Service Data field. I have done this in Android, the packet should be like this:
0x16 is Service Data field listed here https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/
Same thing, I do it in iOS. I use BluetoothCore framework to implement the bluetooth peripheral.
Below is the attribute I should use to set value for Service Data field:
advertisementData[CBAdvertisementDataServiceDataKey] = <somedata>
However I got a warning:
WARNING: The advertisement key 'Service Data' is not allowed
Can someone let me know why and what is the solution?