how can i get locationoif app is in background or foreground for every 5 min : how can i get it?
       
    -(void)updateLocation {
    
    [self performSelector:@selector(updateLocation) withObject:nil afterDelay:300];
    
    [self.locationTracker updateLocationToServer];
    }

but its not working every time
