This file contains hidden or 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
| [string stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; |
This file contains hidden or 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
| @interface | |
| +(id)sharedInstance; | |
| @implementation | |
| - (id)init { | |
| self = [super init]; | |
| #if !(TARGET_IPHONE_SIMULATOR) |
This file contains hidden or 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
| -(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations | |
| { | |
| CLLocation *newLocation = locations.lastObject; | |
| NSTimeInterval locationAge = -[newLocation.timestamp timeIntervalSinceNow]; | |
| if (locationAge > 5.0) return; | |
| if (newLocation.horizontalAccuracy < 0) return; | |
| // Needed to filter cached and too old locations |
NewerOlder