Reputation: 20429
Currently I use the following code on OSX to define advertising data:
[peripheral startAdvertising:@{
CBAdvertisementDataLocalNameKey: @"hello",
// CBAdvertisementDataManufacturerDataKey: manufacturerDataKey,
CBAdvertisementDataServiceUUIDsKey: @[[CBUUID UUIDWithString:@"00001234-0000-1000-8000-00805f9b34fb"]]
}];
But I should add more Generic Access Profile (GAP) data here. I should add here:
How can I add this data?
Upvotes: 0
Views: 828
Reputation: 567
Only CBAdvertisementDataLocalNameKey and CBAdvertisementDataServiceUUIDsKey are supported.
From the CBPeripheralManager Class Reference
advertisementData
An optional dictionary containing the data you want to advertise. The possible keys of an advertisementData dictionary are detailed in CBCentralManagerDelegate Protocol Reference. That said, only two of the keys are supported for peripheral manager objects: CBAdvertisementDataLocalNameKey and CBAdvertisementDataServiceUUIDsKey.
Upvotes: 2