0

I am aware that monitoring is used to notify an application when it enters a specific region. The goal is to simply set up a backend that adds +1 to a count-value that represents the amount of times a smart device entered a region. But I don't think I understood the way monitoring works yet.

If I were to set that only a certain UUID value shall be monitored, the application will be notified at any region of any iBeacon with the same UUID it enters. Is there any way to also obtain Major and Minor values of the regions withouth specifically asking for them / setting them up? It should be possible as the data payload also contains the Major and Minor values anyways?! Or would I need to specify any created beacon with their respective UUID, Major and Minor to be monitored in order to track and increase a count-value?

Let me reprhase: Is it possible to obtain UUID, Major and Minor value when entering any region without having to set up CLLocationManager or monitoring in generall (for Major and Minor) as the payload contains that information? Reading through similar topics on here suggested that in this case ranging comes into play. This got me more confused as I thought ranging only uses the measured power within the data payload to determine the aproximate distance?

Rami D.
  • 5
  • 3

1 Answers1

1

Is it possible to obtain UUID, Major and Minor value when entering any region without having to set up CLLocationManager or monitoring in generall (for Major and Minor) as the payload contains that information?

No. locationManager:didEnterRegion: will be called with a CLRegion object, which will be a CLBeaconRegion containing UUID, major and minor numbers, but those won't correspond to the identifier for, say, the specific beacon that caused the entry event, just to the region you've already supplied. (To be more specific, if you started monitoring just based on UUID, for example, you'll get a CLBeaconRegion with major and minor set to nil, not populated by the values for the beacon that caused the event.)

There's nothing wrong with your reasoning—the device does have the information you're interested in—iOS just doesn't make it available at the application level.

Reading through similar topics on here suggested that in this case ranging comes into play.

Yes, you can start ranging on (or before) region entry, at which point you'll have a list of full identifiers of beacons visible in the region. There's a good answer covering this in a different question.

Community
  • 1
  • 1
Paul A. Hoadley
  • 1,518
  • 1
  • 13
  • 17