MapKit and Core Location 路 Getting Started | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/9236-mapkit-and-core-location/lessons/2

Hi Brian, great tutorial! I鈥檓 having trouble getting the Simulator to update locations. I downloaded the final project for this lesson and ran it, but the locationManager(_:didUpdateLocations) delegate method is never getting called. I set the Simulator to Freeway Drive and restarted, but no luck. Any ideas?

The simulator can get a little wonky when simulating locations. Sometimes, you have to keep switching between freeway drive and city walk and eventually, it鈥檒l start tracking. It鈥檚 definitely a pain.

In the delegate method didUpdateLocations, the documentation says the locations array always has at least one object and that the most recent location is the last object. Might be worth leaving a note on this video that there is no need to do optional check and should use .last instead of .first