0

I just want to say that I have read everything about filtering old locations etc, but this is not the issue. What I just noticed when testing my app on a real iPhone device, was that when I change the "date & time" in "Settings" in the device, the newLocation I get from locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation gives me the same "date & time" as I have in my iPhone device.

I need to get the real timestamp according to network time, and not the phone's, because then I can manipulate the data. How on earth am I supposed to achieve this, did I miss something?

Btw, my locationmanager look like this:

self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
Carnal
  • 21,744
  • 6
  • 60
  • 75

1 Answers1

0

You won't get access to the raw GPS data (with a real timestamp). Why not use an actual ntp server instead?

nevan king
  • 112,709
  • 45
  • 203
  • 241
  • Do u know any library or built in method in order to use NTP? – Carnal Sep 16 '13 at 21:20
  • Not enough to be able to recommend one. Here's another question though: http://stackoverflow.com/questions/2269532/network-time-protocol-for-iphone – nevan king Sep 16 '13 at 21:35
  • Alright, thanks. But I was researching a bit more, and I think I could get my timestamp from my server, and check the elapsed time for the device since start up and mix shit up to get correct time – Carnal Sep 16 '13 at 21:38
  • But I will accept your answer for helping me out to the right direction – Carnal Sep 16 '13 at 21:39