I do agree with Michael G. Emmons, and want to share my experience too:
I tested my code with three regions as shown in the image below:
Explaining the behaviour:
- My current location is Region-1, and i start monitoring for the above
three regions, and call to requestStateForRegion, to determine, if there is any region inside, where i am currenly standing.
- Then i get "Enter" notifications, for first two region (region-1, and region 2), but it should only detect the region-1.
- Now when i enter in region-2, i get the Enter notification for region-3. but i should get the notification for region-2 here.
- Now when i enter in region-1 again, i get the Exit event fired for the region-3, and this continues.
- but i don't get any Enter/Exit events for first two regions, until i move at-least more than 7Km-10Km far from first two regions.
Expected Behaviour:
- Enter/Exit event should be triggered only when i am crossing the boundary of regions, or inside the regions, not before 500 meter from the region.
My Assumption:
- What i have noticed after all the experiment, that when i call
"requestStateForRegion" for all three regions,
- it detects all regions inside region of radius 5000m, thats why it
detects first two regions at the same time (region-1 create a circle
of 5000m radius, and region-2 comes in its range, thats why region -2
is also getting detected).
- and when user moves far more than 10Km, their Exit events will be called and when user comes back in these regions, their Enter event will be fired. Its the same case as explained by Aaron Wardle above.
- Region-3 is getting detected, because,when user enters in region-1, ie. 8-9km far from the region-3, so Exit event is fired for this, and when user is on the route for region-2, here even when region-3 is 5000 meters far, still it detects the region-3 and fire, Enter event for region-3.
So i think that all the regions inside 5000 meters are being detected, and as user moves away 10 km from detected region, its Exit event will be fired. otherwise if user is inside the 5Km range, it will never call it Enter/Exit events again.
Please update me on, if anyone has fixed this issue, or Apple documents anywhere about this issue.