KSR
KSR

Reputation: 97

Location manager delegate not getting called

I am using location service to keep my app alive for longer, its working fine in my iOS6 (Device and Simulator), but in iOS7 its not calling this delegate function of CLLocationManager,

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

How to make this work in iOS7?

Upvotes: 1

Views: 1047

Answers (2)

Rajjjjjj
Rajjjjjj

Reputation: 434

-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations

{
location_updated = [locations lastObject];    
 NSLog(@"updated coordinate are %@",location_updated);

 }

Upvotes: 0

Gajendra Rawat
Gajendra Rawat

Reputation: 3663

This method is Deprecated in iOS 6.0

Use this method

-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations

{
location_updated = [locations lastObject];    
NSLog(@"updated coordinate are %@",location_updated);

}

Upvotes: 6

Related Questions