I\'m somewhat a beginner to iPhone app development, but I\'m trying to make an app that basically updates your location every once a while when it\'s not in the foreground,
You Could just use startUpdatingLocation
but just make sure that your CLLocationManager
's properties are set :
Use distanceFilter
wisely : instead of checking for location update every X minutes , just tell the Location manager to update you every 200/300 meters (depends if your user is on-foot , or driving).
desiredAccuracy
should be as well set to about 100 meters (look at the constants declared in the header files) so your app won't drain the battery..
Your app will not be relaunched if killed , but as long as it stays in the background , it (meaning , the Location Manager's delegate) will continue to receive locationManager:didUpdateToLocation:fromLocation:
.
Hope that helps.