When I monitor a region I frequently get a 'failure to monitor region error'. There does not appear to be any consistency with which I get this error. I can add and remove the exact same region details repeatedly and it will give me this error seemingly randomly, successfully monitoring the region one attempt and then failing with this error the next.

The core locations documentation lists this error as:

kCLErrorRegionMonitoringFailure A registered region cannot be monitored. Monitoring can fail if the app has exceeded the maximum number of regions that it can monitor simultaneously. Monitoring can also fail if the region’s radius distance is too large.

Available in iOS 4.0 and later.

I don't believe that either of these reasons are the cause in this case.

I can get this error on a fresh app install when no regions have been previously registered (so should not exceed the maximum which I understand to be either 10 or 20 depending on where I am reading).

For testing, the radius has been set at 100m (apparently the minimum) and since a region will often register fine using the exact same location and radius as a previous failure after repeated attempts, it does not appear there is anything wrong with the location details I am providing.

Has any one else come across any other reasons or criteria which would lead to this failure to occur?

I have tested on iOS 7 and 8 on iPhone 4s, 5c and 6 using a range of locations and get the error frequently but not consistently or with any discernible pattern. When a region does register, boundary crossing events do fire as expected.

0

There are 0 best solutions below