© Jeffrey Linwood 2020
J. LinwoodBuild Location Apps on iOS with Swifthttps://doi.org/10.1007/978-1-4842-6083-8_2

2. Getting the User’s Location

Jeffrey Linwood1 
(1)
Austin, TX, USA
 

Let’s take our app one step further and show the user’s location on the map. The location functionality in iOS is extremely powerful – you can get the user’s current location, or you can track the user’s location as it changes over time to show their path on a map. We will use the CoreLocation framework for this, as well as the MapKit framework we discussed earlier.

We will add additional functionality to the project from Chapter 1. That FirstMapsApp project already has the map view in place that we will use to show the user’s location.

Privacy and location permissions ...

Get Build Location Apps on iOS with Swift: Use Apple Maps, Google Maps, and Mapbox to Code Location Aware Mobile Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.