Video: Build a navigation app for iOS
Familiarity with Xcode and Swift
The Mapbox Navigation SDK for iOS gives you all the tools you need to add turn-by-turn navigation to your iOS app. You can get up and running in a few minutes with our drop-in navigation view controller, or build a completely custom app with our core components for routing and navigation.
In this video, we'll show you how to install the Navigation SDK, import it into an iOS app, request directions between two predefined waypoints, and show the navigation UI using simulated real-time location in Xcode.
- 0:00 - Take a quick look at the Navigation SDK Documentation Guide
- 0:22 - Create a new access token with
- 0:37 - Create a
.netrcfile using the new access token and save it in your user directory
- 2:27 - Create a new Xcode project
- 3:12 - Create a new access token with public scopes
- 4:15 - Add the public access token to your project's
- 4:46 - Install the Navigation SDK from source (via GitHub)
- 6:55 - Import
MapboxMapsand add a MapView to the main view controller
- 8:15 - Import
- 9:45 - Request a route from the Mapbox Directions API
- 10:55 - Import
MapboxNavigationand use a
showcase()to display the route
- 14:02 - Create a
- 15:38 - Add
Info.plist(see our suggested language)
- 16:47 - Add the
Audio, Airplay, and Picture in Picturebackground mode to your app
- 18:08 - See the Navigation in action using the iOS Simulator's location simulation (set to 'Freeway Drive')
There are many other ways you can customize the Mapbox Navigation SDK for iOS beyond what you've done in this tutorial. For a complete reference of customization options see the Navigation SDK for iOS documentation. Options include:
- Walking and cycling modes.
- Delivering voice instructions using third-party speech synthesizer.
- Building a custom turn-by-turn experience using Core Navigation.