سؤال

Is there any data on how GPS power consumption changes with different CLLocationManager settings, such as desired accuracy and distance filter? How it changes between different iPhone models? How it differs by location?

For my social location-aware app, more accuracy is always better, but no specific amount is required.

هل كانت مفيدة؟

المحلول

Take a look at the section "Tips for Conserving Battery Power" in documentation. In particular this part:

Use lower-resolution values for the desired accuracy unless doing so would impair your app. Requesting a higher accuracy than you need causes Core Location to power up additional hardware and waste power for precision you are not using. Unless your app really needs to know the user’s position within a few meters, do not put the values kCLLocationAccuracyBest or kCLLocationAccuracyNearestTenMeters in the desiredAccuracy property. And remember that specifying a value of kCLLocationAccuracyThreeKilometers does not prevent the location service from returning better data. Most of the time, Core Location can return location data with an accuracy within a hundred meters or so using Wi-FI and cellular signals.

source: Apple Documentation

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top