I've discovered by tests that setting a low desired accuracy for CLLocationManager leads to a buggy behavior of this component.
Here are the 2 tests I've made :
Set the desired accuracy to kCLLocationAccuracyHundredMeters. Then the device can't find my position as accurately as I want. Here are the logs from my CLLocationManager's delegate :
Accuracy is 1500.000000 (desired accuracy is 100.000000)
Accuracy is 1500.000000 (desired accuracy is 100.000000)
That's it. Two events in 30 seconds with an horizontal accuracy of 1500.Set the desire accuracy to kCLLocationAccuracyBest. Then the device finds me! Same logs:
Accuracy is 1500.000000 (desired accuracy is -1.000000)
...
Accuracy is 162.957953 (desired accuracy is -1.000000)
...
Accuracy is 76.356886 (desired accuracy is -1.000000)
...
Accuracy is 47.421634 (desired accuracy is -1.000000)
I'm at the very same spot I was for test 1 but this time, the device is able to find my location with the accuracy I wanted first (ie 100.0).
I've repeated these two tests many many times, for the same results.
My question is : "Does anybody know why the iPhone device doesn't try harder to find my position when I set an accuracy of kCLLocationAccuracyHundredMeters?"
I assume that setting the accuracy to kCLLocationAccuracyBest may turn on some different hardware sensor but can't this be considered as a bug? I couldn't find stuff on the internet relative to this problem.
Thanks for sharing your own experience. (the tests were made with a 3GS device over Wi-Fi and phone network)