Created
May 7, 2016 01:34
-
-
Save nfarah86/3fabaf19f38016d59002f6b810df6f1c to your computer and use it in GitHub Desktop.
Store GPS coordinates in the Database
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
// 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