I have an iOS App as peripheral which advertises packets.
NSDictionary *advertise = @{CBAdvertisementDataLocalNameKey : shortName, CBAdvertisementDataServiceUUIDsKey: @[[CBUUID UUIDWithString:uuidA]]};
[self.manager startAdvertising:advertise];
Then, my other centratl app will scan and filter by the same serviceUUID.
[self.manager scanForPeripheralsWithServices:@[[CBUUID UUIDWithString:uuidA] options:@{CBCentralManagerScanOptionAllowDuplicatesKey: @(true)}];
Now, we want to change the ServiceUUID (uuidA -> uuidB), but we hope that the old version of the central app can still scan for the new peripheral app, so I need do multi-advertisement of BLE.
// 1
NSDictionary *advertise = @{CBAdvertisementDataLocalNameKey : shortName, CBAdvertisementDataServiceUUIDsKey: @[[CBUUID UUIDWithString:uuidA], [CBUUID UUIDWithString:uuidB]]};
[self.manager startAdvertising:advertise];
// 2
NSDictionary *advertise = @{CBAdvertisementDataLocalNameKey : shortName, CBAdvertisementDataServiceUUIDsKey: @[[CBUUID UUIDWithString:uuidA]]};
[self.manager startAdvertising:advertise];
NSDictionary *advertise = @{CBAdvertisementDataLocalNameKey : shortName, CBAdvertisementDataServiceUUIDsKey: @[[CBUUID UUIDWithString:uuidB]]};
[self.manager2 startAdvertising:advertise];
However, these two implementations, on the central side, it can always scan only one broadcast packet.
Can somebody suggest any method to do this task? From the central (scanner) app, I should get two different advertisements.