You want to use a CoreLocation delegate. Once you get the coordinate, stop CoreLocation, set a timer to start it in 5 minutes.
With iOS 8, you will need to set the plist entry for NSLocationWhenInUseUsageDescription and / or NSLocationAlwaysInUseDescription.
The Apple documentation is very clear on how to do this.
-(void)startUpdating{ self.locationManager = [[CLLocationManager alloc]init]; self.locationManager.delegate = self; [self.locationManager requestWhenInUseAuthorization]; [self.locationManager setDesiredAccuracy:kCLLocationAccuracyBest]; [self.locationManager startUpdatingLocation]; } -(void)timerFired{ [self.timer invalidate]; _timer = nil; [self.locationManager startUpdatingLocation]; }
source share