Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Why are you using</p> <pre><code>self.locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters </code></pre> <p>and not <code>kCLLocationAccuracyBest</code>? Of course, without comparing the horizontal accuracy with this, as you noticed yourself, <em>negative</em> constant - but some reasonable other value (say 100.0m) instead. Have you tried whether it makes a difference?</p> <p>The desired accuracy controls how much effort is put into the position acquisition (for the higher values, GPS is not even turned on, as you can check with Xcode/Instruments/EnergyDiagnostics). Less effort results in both less accuracy and/or more time to get a position. Doesn't that sound reasonable?</p> <p>From my own observations: When asking iOS for a position with a certain desired precision, the result can be anything: Less accurate (i.e. in a building with poor GPS reception), as accurate as desired, or in fact more accurate than needed (another application or another CLlocationManager object of the same application might simultaneously ask the hardware for a higher accuracy - then all other applications inherit the better values without additional effort). </p> <p>In addition to the above, it <em>might</em> make a difference whether you iOS device is accessing the internet, because it is an <em>assisted</em> GPS receiver. Maybe there is some kind of side effect with some assisting data being downloaded, if the device happens to be online because of some other internet activity. This last thought is pure speculation, though.</p> <p>One more thing: If I haven't overlooked it in your code, then you have not defined a distance filter. Try something like</p> <pre><code>self.locationManager.distanceFilter = kCLDistanceFilterNone; </code></pre> <p>to ensure you get as many updates as possible.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload