Last active
August 29, 2015 14:20
-
-
Save StuartFarmer/39d62001173bf2e0f868 to your computer and use it in GitHub Desktop.
Set up location manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize location services. | |
locationManager = [[CLLocationManager alloc] init]; | |
[locationManager requestAlwaysAuthorization]; | |
locationManager.delegate = self; | |
// Accuracy constants here. These should be tested for battery optimization. | |
locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; | |
locationManager.distanceFilter = kCLDistanceFilterNone; | |
[locationManager startUpdatingLocation]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment