Kodeco Forums

Video Tutorial: MapKit and Core Location Part 1: Core Location

Learn the basics of working with Core Location and how to integrate it into your app.


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

Hi ,

As per tutorial , I implemented the code but didUpdateLocations is not getting called . I downloaded the demo also but same thing , didUpdateLocations is not getting called .

Any help?

Thanks .

There may be a couple of reasons for this. Did you add the key in info plist to be either NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription? Without that key, then location services will not run.

One way to tell is if an alert box asks you to use location services. If you don’t see that alert, then you know that the key is missing.

Other times, the simulator may need a little “kick”. When the simulator is running, go into Debug / Locations and choose a location. I tend to pick Apple and that should start firing off location updates.

I hope that helps!

How come there is a red line through CoreLocation when i try to import it? Is CoreLocation different from MapKit?

I just found this tutorial video and it looks great! Unfortunately Apple forced me to download Xcode 8 and I’m getting all kinds of warnings on the code. I tried the various fix-its but I’m not getting location updates, even after “kick-starting” location in the simulator. Any suggestions?

Unfortunately, this series was produced using Swift 2. It hasn’t been updated to Swift 3. It’s in our queue.

NSLocationWhenInUseUsageDescription → Privacy - Location When In Use Usage Description

How should I Change this section for Swift3?

Hi Brian,

I am waiting for this course in Swift 3. Please update soon. :smile:

I have a query

Does MapKit support the following functionalities or should we go for the third party SDKs?

WMS(Web Map Service)
WFS(Web Feature Service)
GeoJSON Geometry support.

When I search I found that for WMS and WFS ArcGIS Runtime SDK for iOS is available. ArcGIS Runtime SDK for iOS 10.2.5 | ArcGIS Runtime API for iOS | ArcGIS Developers

and for GeoJSON Geometry support GEOSwift is available.

Mapbox iOS SDK is also there Add a line with a color gradient | Maps SDK | iOS | Mapbox

So for GeoJSON Geometry support should I go with MapBox. and ArcGIS SDK for WMS and WFS

Please reply.

The following worked for me. I replaced this:

if let name = property["Name"] as? [String:Any]

with this:

if let name = (property as AnyObject)["Name"] as? String

Hope this helps.

When (and where) do you recommend to create the locationManager in a productive app?
Should it be created as a singleton? Since there should only be one locationManager in the app at a given time?
Thanks, love your videos.

This video course is more than six months old, so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]

I am a Advanced Education Interactive Media student at North Island College In Courtney British Columbia Canada , Your books are the textbooks for our Swift & ISO application courses . As required I bought the textbook and the PDF book , However reading comprehension has never been my strong suit, So the Hands-on Videos here are very helpful ; Basically you’ve been My instructor Brian , thanks for the check list Lesson Video from my textbook Well worth 25 bucks a month , The only thing is some of the tutorials here , are out of date , I’ve been telling My fellow students about the video courses on this website … Please update Map course and Camera picker for they are key parts of our course … Your videos have been very helpful thank you Brian I look forward to updates … Course platform is from IOS apprentice Textbook , But I would like to continue Learning By following the tutorial and videos on this website As I said well worth $25 Canadian :wink:

I’m so glad the courses have been helpful. We try to keep all of our courses up to date. I’ll see if we can make some time on the schedule to get this one up to date as well. Thanks for reaching out to us!

Note, this is my old forum account. My active account is @bdmoakley. Ping me there if you need anything. Thanks so much!