Hi David,
I do experience the same behaviour. I did notice that the advertising package changes from:
Code Block advertisementData { |
kCBAdvDataIsConnectable = 1; |
kCBAdvDataRxPrimaryPHY = 0; |
kCBAdvDataRxSecondaryPHY = 0; |
kCBAdvDataServiceUUIDs = ( |
<my UUID service> |
); |
kCBAdvDataTimestamp = "617187146.149648"; |
kCBAdvDataTxPowerLevel = 12; |
} |
to:
Code Block advertisementData { |
kCBAdvDataHashedServiceUUIDs = ( |
<my UUID service> |
); |
kCBAdvDataIsConnectable = 1; |
kCBAdvDataRxPrimaryPHY = 0; |
kCBAdvDataRxSecondaryPHY = 0; |
kCBAdvDataTimestamp = "617187146.524474"; |
kCBAdvDataTxPowerLevel = 12; |
} |
where the kCBAdvDataHashedServiceUUIDs string is the CBAdvertisementDataOverflowServiceUUIDsKey constant. Which is the same behaviour that I see when the advertising app does the transition from the foreground to the background.
just to ads something on top of it, when the advertising app does the transition from the background to the foreground, the advertising changes again to something I don't expect:
Code Block { |
kCBAdvDataHashedServiceUUIDs = ( |
<my UUID service> |
); |
kCBAdvDataIsConnectable = 1; |
kCBAdvDataRxPrimaryPHY = 0; |
kCBAdvDataRxSecondaryPHY = 0; |
kCBAdvDataServiceUUIDs = ( |
<my UUID service> |
); |
kCBAdvDataTimestamp = "617105621.560463"; |
kCBAdvDataTxPowerLevel = 12; |
} |
Now, if I stop advertising I get the same advertising I observe when the advertising is going on in the background (it shouldn't advertise at all because I stopped it):
Code Block advertisementData { |
kCBAdvDataHashedServiceUUIDs = ( |
<my UUID service> |
); |
kCBAdvDataIsConnectable = 1; |
kCBAdvDataRxPrimaryPHY = 0; |
kCBAdvDataRxSecondaryPHY = 0; |
kCBAdvDataTimestamp = "617187146.524474"; |
kCBAdvDataTxPowerLevel = 12; |
} |
In both scenarios, a scanning iOS device will detect my app (either after being killed or after the startadv-fg-bg-stopadv dance) as an iOS app advertising in background.
I do understand that your case is a bit different, because you have a custom hardware scanning.
Did you manage to find a solution? I tried to clean up on killing (removing published services and stopping the advertising) but I did not manage to solve the issue.
Enrico