Reputation: 97
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
Reputation: 434
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
location_updated = [locations lastObject];
NSLog(@"updated coordinate are %@",location_updated);
}
Upvotes: 0
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