I have to run my app in iPhone OS 4.0. (in simulator).
-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self newLocationUpdate];
}
-(void)newLocationUpdate
{
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
[locationManager startUpdatingLocation];
}
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
[locationManager stopUpdatingLocation];
}
In this CLLocationManager delegate method is not getting called. what changes should we make so that delegate method is called?