0

I am developing an iOS 8 app with multiple Estimote iBeacons. According to (https://community.estimote.com/hc/communities/public/questions/200966066-How-detect-multiple-beacons-iOS?locale=en-us), I implemented one BeaconManager, and registered it with two BeaconRegions. However, only the second beacon region works.

Instead, I used two BeaconManagers and register one BeaconRegion for each of them. Now it works. However, a new problem occurs: in some cases when I enter or exit the region, I receive multiple notifications for one beacon, instead of only one. This link (http://beekn.net/2013/11/ibeacon-tutorial-dealing-with-errors/) says it's a bug from Apple, but I am not sure about the case.

Anyone can help?

Thanks, Ryan

ailoiss
  • 3
  • 3

2 Answers2

0

Beacon regions are shared system resources, which means that all the BeaconManagers and LocationManagers are notified about state changes of all the regions registered in the app.

Example: if you monitor beacon region A with manager A, and beacon region B with manager B, manager A will still get notifications about region B. Same for manager B and region A.

Because of that, it rarely makes sense to have more than one instance of a BeaconManager in your app.

Monitoring multiple regions should work just fine with a single BeaconManager, there must be something specific to your code that leads to one of the regions not working. If you could add a code snippet to your question, that'd probably help tracking the issue down.

heypiotr
  • 2,139
  • 2
  • 15
  • 22
  • Thanks. It works. I dont know why it does not work before, but now I changed to one Beacon manager, it works fine. – ailoiss Jan 28 '15 at 11:46
  • BTW, I use major and minor to location one beacon in each region, thus I thought one beacon manager will only listen for one beacon. But it seems not to be the case. – ailoiss Jan 28 '15 at 11:48
0

As per my opinion, these should be only one beacon manager to manage all beacon.

And if you have beacon from same vendor (In your case it is Estimote iBeacons) then I don't think that you need to create more than one region here.

Because all beacons of same vendors have same proximity UUID. What is different is its Major value and Minor value.

So you can differentiate all beacons with its Major and Minor values also there is a ranging which can make a further granularity for seperation.

Kampai
  • 22,848
  • 21
  • 95
  • 95