Prior to iOS 4.0, CoreLocation
was reporting altitude correctly, now it always reports as 0 ft.
-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation *)oldLocation
{
NSString *tLatitude = [NSString stringWithFormat:@"%3.5f", newLocation.coordinate.latitude];
NSString *tLongitude = [NSString stringWithFormat:@"%3.5f", newLocation.coordinate.longitude];
/* the following returns 0 */
NSString *tAltitude = [NSString stringWithFormat:@"%i", newLocation.altitude];
/* theres more code, but it's not relevant,
and this worked prior to iOS 4.0*/
[manager stopUpdatingLocation];
}
Not working on Device nor Simulator, does anyone else experience this issue?