I've simplified the question a bit. When I create and add regions in my app and interrogate the state of those regions I see the following in monitoringDidFailForRegion
method:
The operation couldn’t be completed. (kCLErrorDomain error 4.)
Checking the CLErrorDomain constants I see that error 4 is kCLErrorRegionMonitoringDenied
and it is described like so:
Access to the region monitoring service was denied by the user.
How is this possible? Here's my set up and what I've checked:
- I am working through Xcode to watch log statements.
- I am connected to my iPhone 5. I am not running in the simulator.
- I have ensured that the radius is sufficient in size to be monitored (though it shouldn't matter).
- I have ensured that Settings > Privacy > Location Services is on for my device and my app.
- I've read every Core Location and Region Monitoring document Apple has ever published.
- I have ensured that WiFi is on and that I have a strong cellular signal. If I didn't it wouldn't be able to find my location in the first place.
- I have ensured that
didChangeAuthorizationStatus
reports the correct status:kCLAuthorizationStatusAuthorized
- I have ensured that after adding my region that monitoring does in-fact begin by observing the call to the method
didStartMonitoringForRegion
.
What am I missing? Why do I see this error when Location Services are clearly enabled?