Clicky

iOS Dev Nugget 191 Reducing Power Consumption While Using Core Location

.

Need to run a code review on your codebase? Hire me

If you use Core Location to track user's location, one way to reduce power consumption is to set the pausesLocationUpdatesAutomatically property of CLLocationManager along with activityType to an appropriate type so Core Location knows when it can pause location updates.

var locationManager = CLLocationManager()
locationManager.pause = true
locationManager.activityType = .Fitness


Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No

.

.

Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter

.

View archives of past issues