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

5. Getting Directions with MapKit

Jeffrey Linwood1 
Austin, TX, USA

Providing walking or driving directions from one place to another inside your application is easy with MapKit. You can also instruct the Apple Maps app to open up and route the user to a location – this could be useful if you think the user might just prefer to use a dedicated app.

Create another Swift iOS project in Xcode with the Single View Application template. Name your application DirectionsMapKitApp. Go ahead and add a map view to the only screen in the storyboard, and connect it to an outlet called mapView on the ViewController class . In the view controller, ...

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.