Storyboards

To set up Mapbox Navigation in a storyboard:

  • Open the object library and drag in a Storyboard Reference.
  • Pick Navigation from the dropdown. Set Bundle to MapboxNavigation-MapboxNavigation-resources if you are using Swift Package Manager or org.cocoapods.MapboxNavigation if you are using CocoaPods.
  • Set up a segue to the storyboard reference like you would to any other UIViewController.

You also need to pass a route, routeIndex, routeOptions, and optionally a navigationOptions to the NavigationViewController. To do that, override your UIViewController's prepare(for:sender:):

Further resources