Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Created May 7, 2016 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfarah86/742fdf99f7dd595d0045b15a1237ca44 to your computer and use it in GitHub Desktop.
Save nfarah86/742fdf99f7dd595d0045b15a1237ca44 to your computer and use it in GitHub Desktop.
Store GPS coordinates in the Database
// omitted code
-(void)timerDidFire: (id)sender {
NFHLocationManager *locationManager = [NFHLocationManager sharedLocationManager];
if(locationManager.updating) {
CLLocation *location = [locationManager lastLocation];
[self updateInterfaceWithLocation:location];
// BELOW - we send the coordinates to /update_run to the database in the web app
[[NFHWebServiceManager sharedWebServiceManager]sendUpdateRunRequestWithLocation:location];
}
}
// omitted code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment