Skip to content

Instantly share code, notes, and snippets.

@DonMag
Created March 10, 2016 21:16
Show Gist options
  • Select an option

  • Save DonMag/3e1ff61e2b186e3ca83a to your computer and use it in GitHub Desktop.

Select an option

Save DonMag/3e1ff61e2b186e3ca83a to your computer and use it in GitHub Desktop.
Scenario:
We have iPads at various locations...
Users have iPhones, with an "Act as a BLE beacon" app, using the Service UUID as an identifier...
The iPads need to respond when a user gets in range...
The iPads *also* have to respond to any other BLE in range...
So far, not a big deal. However...
When the iPhone app goes background, it can ONLY broadcast the Service UUID,
and the iPad can ONLY find it if explicitly scanning for that UUID
Again, shouldn't be a big deal. Create two CBCentralManagers,
one to scan for nil, one to scan for known / registered Service IDs.
Except...
When the iPhone app is in the foreground, it looks identical to any other beacon, and gets picked up by both managers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment