2
votes

Let's say I have 100 beacons clustered in one location with the same UUID and different majors/minors. I want to know when user approaches each of them and get a callback in background (didEnterRegion).

To do this I can initialize beacon regions with this method:

initWithProximityUUID:major:minor:identifier:

and use the startMonitoring method on CoreLocation. The problem is that it can listen to 20 beacon regions max. Is there any way around that ?

2
Yes, but I'm asking if it's possible to do while the app is in the background. The accepted answer proposes using ranging beacons - which is a functionality only available when the app is in foreground.michal.ciurus
No, you can range in the background -developer.radiusnetworks.com/2014/11/13/…Paulw11
That's probably the best answer I'll get. 3 minutes of ranging after entering beacon region. Please post it as an answer so I can mark it as answered :)michal.ciurus

2 Answers

0
votes

There are two ways:

0
votes

A potential solution is to allocate a unique major value only across overlapping beacons. E.g. if you have a beacon in an office, assign a different major to each beacon in all nearby offices next door, above and below. Then for a beacon that is out of range of this office, you can then reuse the major again. Then you can monitor for UUID + major and hopefully you have less than 20. Use the minor value plus the shared major and make a unique ID for the room, e.g.

Office 1, major 1, minor 1
Office 2, major 2, minor 1
Office 3, major 1, minor 2

Office 3 is out of range of office 1 so they can use the same major. Hence you will receive a didLeaveRegion notification for office 1 followed by didEnterRegion office 3 because it is not possible to enter 3 without leaving 1.

Note this is just the theory, has not been tested yet. If you would like me to test it out then just let me know.