tags:

views:

272

answers:

1

Hi,

I have to run my app using iPhone OS 4.0. but while I am running my app the CLLocationManager delegate is not getting called.

The delegate method is

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
}
A: 

I can probably help, as I've been dealing with CLLocationManager successfully on iOS4 on a 3GS device, but I need more information.

1) Did you alloc/init the CLLocationManager previously and call startUpdatingLocation? Please include that code, we may be able to help. Specifically, where/how you are setting the delegate? Also, make sure someone is retaining your delegate class so that way you're able to receive the calls. CLLocationManager will not retain the delegate.

2) Are you testing on a device, or on the Simulator? If you are testing on a device, which device?

phooze