The difference between didEnterRegion and didRangeBeacons

What is the exact difference between didEnterRegion and didRangeBeacons in terms of usage, I mean when should I implement didEnterRegion / didExitRegion, and when didRangeBeacons should be implemented?

What is the function of each delegate for precise functionality? From the Apple documentation this is not very clear.

- (void)locationManager:(CLLocationManager *)manager
         didEnterRegion:(CLRegion *)region
{
} 

and

- (void)locationManager:(CLLocationManager *)manager
        didRangeBeacons:(NSArray *)beacons
               inRegion:(CLBeaconRegion *)region
{
}
+4
source share
2 answers

didEnterRegioncalled once when you cross the threshold of an area (i.e. detect a beacon). As soon as you leave the area (i.e. the Lighthouse will no longer be visible), it will be called didExitRegion, and then it didEnterRegionwill be called again if you enter the region again.

didRangeBeacons , , , , .

, didEnterRegion, , didExitRegion.

. -

+6

A CLBeaconRegion, UUID , UUID ( " " ).

didEnterRegion , , CLBeaconRegion, , . didExitRegion , .

:

  • , .

didRangeBeacons CLBeacon. , didExitRegion ( , ). , , , - , didRangeBeacons.

  1. , CLBeacon.

, . , , didRangeBeacons.

+1

All Articles