With the release of iOS6 Apple wants us to use didUpdateLocations instead of didUpdateToLocation. Can anyone explain how to properly use didUpdateLocations?
I asume you used the following delegate to get the last position?
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
The delegate above is deprecated in iOS 6. Now the following should be used:
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations
In order to get the last position, simply get the last object of the array:
[locations lastObject]
In other words, [locations lastObject]
(new delegate) equals newLocation
(old delegate) .