I am using iphone simulator 4.2 and trying to display either NSLog Headers and other attributes of location services, for example. Latitude, longitude, height, horizontal accuracy, vertical accuracy, speed. but it does not show the correct parameters and Incase of Heading, without actually launching this event. how to execute it CLLocation code
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { [self.delegate locationUpdate:newLocation]; }
and does not execute CLHeading code
- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading { [self.delegate headingUpdate:newHeading]; }
and when I set a breakpoint on both of these codes, it never touches the CLHeading code. I am updating the location and title in init.
- (id) init{ if (self!=nil) { self.locationManager = [[[CLLocationManager alloc] init] autorelease]; self.locationManager.delegate = self; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; self.locationManager.distanceFilter = kCLDistanceFilterNone; [self.locationManager startUpdatingLocation]; [self.locationManager startUpdatingHeading]; } return self; }
The problem is that I donβt know what is connected with the simulator or are there any problems with the code?
Please, help.
source share