views:

209

answers:

1

Hi,

I am using the CLLocationManger to update the current location. Though its giving me the location but the location I am getting is of much older timestamp. I am facing the problem in, how to force the locationcontroller to update the fresh location not the cached location.

Currently I am using this tutorial......

http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/

Anybody know how to update location at current timestamp not the cached one?

A: 

Are you running your project on simulator or on iPhone? If you are running project on simulator then

-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation

will be called only once.

If you are testing on device then it should be called everytime your location is changed.

Make sure you have set the location manager property,

locationManager.delegate=self;

[locationManager startUpdatingLocation];

Hope that helps...

Napster
thanks napster but i told that i dont want an update on location-change basis but on the time basis. So please check my requirements and then answer
Madhup