CLLocationManager delegate changes to iOS6


#1

Evidently the delegate method:

 [code]locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation:[/code]

is depreciated and you must now use:

[code]locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations[/code]

My question would be (and I admit I havent researched the documentation) is why would there be more than one location? - and thus the need for a NSArray? Someone down below recommended sending the message lastObject to locations so evidently some more data is being collected?


#2

so i glanced at the documentation and it is depreciated :

developer.apple.com/library/ios/ … egate.html

Incidentally in the Mac OSX library documentation it isnt out front and center that it is depreciated - you have to click on the old delegate to see that it has been depreciated - They havent added the new delegate method in the Mac OSX side -

And to answer my question from above, about why you would need an array - according to the docs:

  1. Why would update events be deferred? I would think that the delegate would receive the message once it had data. Which would mean in this case - the initial location information?

In the book(3rd edition) it says, “…whenever the location manager finds the current location, it sends the message … to its delegate”. It makes sense but it would be nice to know when or how your updates could essentially be “held back” because of some reason. Anyone that has any insight - let me know. thanks!


#3

Here is some explanation I’ve found concerning how to use it now. Though it doesn’t answer your questions
stackoverflow.com/questions/1260 … tolocation