> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/ios/navigation/v2/llms.txt)

# Migrate to v2

Mapbox Navigation SDK for iOS v2 is a major new version of the SDK. To upgrade, follow [the installation instructions](https://docs.mapbox.com/ios/navigation/v2/guides/get-started/install/). Note that the `MapboxNavigation` framework's Carthage support has been discontinued in favor of Swift Package Manager. If you decide to keep using Carthage for the `MapboxCoreNavigation` framework, you will need to [migrate from framework bundles to XCFrameworks](#migrating-a-project-from-framework-bundles-to-xcframeworks).

Starting with v2.0.0, you can choose from [two new pricing options](https://docs.mapbox.com/ios/navigation/v2/guides/pricing/) depending on your use case: metered or unlimited trips. Also, the Mapbox Navigation SDK is licensed under the [Mapbox Terms of Service](https://github.com/mapbox/mapbox-navigation-ios/blob/v2.0.0/LICENSE.md), a proprietary license. It is no longer available under the permissive ISC License.

Navigation SDK v2 includes [many important changes](https://docs.mapbox.com/ios/navigation/api/2.0.0/#changes-in-version-2-0-0) to the public APIs of the `MapboxNavigation` and `MapboxCoreNavigation` frameworks as well as their dependencies. There are several backwards-incompatible changes to be aware of as you upgrade, which are discussed below and divided by framework so that you can upgrade different portions of your application at different times.

## System requirements

-   Supported dependency managers:
    -   Swift Package Manager (new)
    -   CocoaPods
    -   Carthage (`MapboxCoreNavigation` only. `MapboxNavigation` and `mapbox-directions-swift` command line tool no longer supported.)
-   Minimum Xcode version required to build the SDK: **12.4** (11.*x* no longer supported)
-   Minimum iOS deployment target: **11.0** (10.*x* no longer supported)

## Upgrading Turf from v1.*x* to v2.0.0

Turf v2 revamps the GeoJSON types to better conform to the GeoJSON specification. Consult the [Turf v2.0.0 release notes](https://github.com/mapbox/turf-swift/releases/tag/v2.0.0), which detail changes to the type system and examples for upgrading.

GeoJSON is now represented using Turf types throughout Mapbox's SDKs, including in the Maps SDK's public API, so it is no longer necessary to convert between Turf GeoJSON types and the Maps SDK's shape types.

## Upgrading `MapboxDirections` from v1.*x* to v2.0.0

-   The preferred way to set your Mapbox access token is to set the `MBXAccessToken` key in your application's Info.plist. `MGLMapboxAccessToken` is still supported as a deprecated fallback.
-   The `Incident.impact` property is now an [`Incident.Impact`](https://docs.mapbox.com/ios/directions/api/2.0.0/Structs/Incident/Impact.html) value instead of a string.
-   [`RouteOptions.alleyPriority`](https://docs.mapbox.com/ios/directions/api/2.0.0/Classes/RouteOptions.html#/s:16MapboxDirections12RouteOptionsC13alleyPriorityAA0bF0VSgvp), [`RouteOptions.walkwayPriority`](https://docs.mapbox.com/ios/directions/api/2.0.0/Classes/RouteOptions.html#/s:16MapboxDirections12RouteOptionsC15walkwayPriorityAA0bF0VSgvp), and [`RouteOptions.speed`](https://docs.mapbox.com/ios/directions/api/2.0.0/Classes/RouteOptions.html#/s:16MapboxDirections12RouteOptionsC5speedSdSgvp) are now optional. Set them explicitly if you want to include them in the HTTP request. Renamed `DirectionsOptions.default` to `DirectionsOptions.medium`.
-   Removed the `DirectionsResult.routeIdentifier` property. Use the `RouteResponse.identifier` property in conjunction with an index into the `RouteResponse.routes` array instead.

## Upgrading `MapboxSpeech` from v1.*x* to v2.0.0

The preferred way to set your Mapbox access token is to set the `MBXAccessToken` key in your application's Info.plist. `MGLMapboxAccessToken` is still supported as a deprecated fallback.

## Upgrading from Mapbox Maps SDK v6.*x* to `MapboxMaps` v10.0.0

Mapbox Maps SDK v10 introduces 3D terrain, improves performance, and upgrades from OpenGL to Metal. Consult the [v10 migration guide](https://docs.mapbox.com/ios/maps/guides/old-versions/migrate-to-v10), which details many changes that likely affect your application's user interface code.

Other changes:

-   The preferred way to set your Mapbox access token is to set the `MBXAccessToken` key in your application's Info.plist. `MGLMapboxAccessToken` is no longer supported.

## Upgrading `MapboxNavigation` from v1.*x* to v2.0.0

### Packaging

-   `MapboxCoreNavigation` no longer depends on [`MapboxAccounts`](https://github.com/mapbox/mapbox-accounts-ios/).
-   `MapboxNavigation` now depends on [`MapboxMaps`](https://github.com/mapbox/mapbox-maps-ios/) instead of `Mapbox.framework` (`Mapbox-iOS-SDK` pod).
-   The `MBXNavigationBillingMethod` Info.plist key is no longer supported.

### Map

The following symbols were renamed or replaced:

-   Replaced the `NavigationMapView.navigationMapDelegate` and `NavigationMapView.navigationMapViewDelegate` properties with a single [`NavigationMapView.delegate`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationMapView.html#/s:16MapboxNavigation0B7MapViewC8delegateAA0bcD8Delegate_pSgvp) property.
-   Renamed the `NavigationViewController.mapView` property to [`NavigationViewController.navigationMapView`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationViewController.html#/c:@M@MapboxNavigation@objc(cs)NavigationViewController(py)navigationMapView%3E).
-   Renamed the `MGLStyle.navigationDayStyleURL` and `MGLStyle.navigationNightStyleURL` properties to [`StyleURI.navigationDay`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Extensions/StyleURI.html#/s:10MapboxMaps8StyleURIV0A10NavigationE13navigationDayACvpZ) and [`StyleURI.navigationNight`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Extensions/StyleURI.html#/s:10MapboxMaps8StyleURIV0A10NavigationE15navigationNightACvpZ), respectively. Removed the `MGLStyle.navigationDayStyleURL(version:)` and `MGLStyle.navigationNightStyleURL(version:)` methods in favor of these renamed properties.
-   Renamed the `NavigationMapView.highlightBuildings(at:in3D:)` method to [`NavigationMapView.highlightBuildings(at:in3D:completion:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationMapView.html#/s:16MapboxNavigation0B7MapViewC18highlightBuildings2at4in3D10completionySaySo22CLLocationCoordinate2DVG_SbySbcSgtF).

> **Related content (guide): [Maps for navigation](https://docs.mapbox.com/ios/navigation/guides/map-and-camera/maps/)**
> 
> Read more about using maps in the Navigation SDK v2.

#### Camera

The following symbols were renamed or replaced:

-   Removed the `CarPlayNavigationViewController.tracksUserCourse` property and the `NavigationMapView.enableFrameByFrameCourseViewTracking(for:)`, `NavigationMapView.updateCourseTracking(location:camera:animated:)`, `NavigationMapView.setOverheadCameraView(from:along:for:)`, and `NavigationMapView.recenterMap()` methods in favor of the [`NavigationMapView.navigationCamera`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationMapView.html#/s:16MapboxNavigation0B7MapViewC16navigationCameraAA0bF0CSgvp) property.
-   Removed the `NavigationMapView.defaultAltitude`, `NavigationMapView.zoomedOutMotorwayAltitude`, `NavigationMapView.longManeuverDistance`, `NavigationMapView.defaultPadding`, `NavigationMapView.courseTrackingDelegate`, and `NavigationViewController.pendingCamera` properties and the `NavigationMapViewDelegate.navigationMapViewUserAnchorPoint(_:)` method in favor of the [`NavigationCamera.cameraStateTransition`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationCamera.html#/s:16MapboxNavigation0B6CameraC21cameraStateTransitionAA0ceF0_pvp) property.
-   `NavigationMapView.updateCourseTracking(location:camera:animated:)` accepts a [`CameraOptions`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Extensions/CameraOptions.html) instance instead of an `MGLMapCamera` object.
-   Changed the `NavigationViewController.pendingCamera` property's type from `MGLMapCamera` to [`CameraOptions`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Extensions/CameraOptions.html).

> **Related content (guide): [Navigation viewport camera](https://docs.mapbox.com/ios/navigation/guides/map-and-camera/navigation-camera/)**
> 
> Read more about how the camera works in the Navigation SDK v2.

#### User location indicator

The following symbols were renamed or replaced:

-   Removed the `NavigationMapView.showsUserLocation` and `NavigationMapView.tracksUserCourse` properties in favor of [`NavigationMapView.userLocationStyle`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationMapView.html#/s:16MapboxNavigation0B7MapViewC17userLocationStyleAA04UserfG0OSgvp).
-   Removed the `NavigationMapView.userCourseView` property in favor of the associated value when `NavigationMapView.userLocationStyle` is set to [`UserLocationStyle.courseView(_:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Enums/UserLocationStyle.html#/s:16MapboxNavigation17UserLocationStyleO10courseViewyAcA15CourseUpdatable_So6UIViewCXccACmF).
-   Renamed the `CourseUpdatable.update(location:pitch:direction:animated:tracksUserCourse:)` method to [`CourseUpdatable.update(location:pitch:direction:animated:navigationCameraState:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/CourseUpdatable.html#/s:16MapboxNavigation15CourseUpdatableP6update8location5pitch9direction8animated21navigationCameraStateySo10CLLocationC_12CoreGraphics7CGFloatVSdSbAA0bkL0OtF).

#### Route overlay

The following symbols were renamed or replaced:

-   Removed the `NavigationAnnotation` class.
-   Renamed the `MBRouteLineWidthByZoomLevel` property to [`Constants.RouteLineWidthByZoomLevel`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Configuration.html#/s:16MapboxNavigation25RouteLineWidthByZoomLevelSDyS2dGvp) and changed its type to `Double` for keys and values.
-   Renamed the `MBCurrentLegAttribute` and `MBCongestionAttribute` constants to [`Constants.CurrentLegAttribute`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Configuration.html#/s:16MapboxNavigation19CurrentLegAttributeSSvp) and [`Constants.CongestionAttribute`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Configuration.html#/s:16MapboxNavigation19CongestionAttributeSSvp), respectively.
-   Renamed the `NavigationMapView.updateRoute(_:)` method to [`NavigationMapView.travelAlongRouteLine(to:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationMapView.html#/s:16MapboxNavigation0B7MapViewC20travelAlongRouteLine2toySo22CLLocationCoordinate2DVSg_tF).
-   Renamed the following waypoint styling delegate methods:
    -   `NavigationMapViewDelegate.navigationMapView(_:waypointCircleLayerWithIdentifier:source:)` to [`NavigationMapViewDelegate.navigationMapView(_:waypointCircleLayerWithIdentifier:sourceIdentifier:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationMapViewDelegate.html#/s:16MapboxNavigation0B15MapViewDelegateP010navigationcD0_33waypointCircleLayerWithIdentifier06sourceK00A4Maps0hI0VSgAA0bcD0C_S2StF)
    -   `NavigationMapViewDelegate.navigationMapView(_:waypointSymbolLayerWithIdentifier:source:)` to [`NavigationMapViewDelegate.navigationMapView(_:waypointSymbolLayerWithIdentifier:sourceIdentifier:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationMapViewDelegate.html#/s:16MapboxNavigation0B15MapViewDelegateP010navigationcD0_33waypointSymbolLayerWithIdentifier06sourceK00A4Maps0hI0VSgAA0bcD0C_S2StF)
    -   `NavigationViewControllerDelegate.navigationViewController(_:waypointCircleLayerWithIdentifier:source:)` to [`NavigationViewControllerDelegate.navigationViewController(_:waypointCircleLayerWithIdentifier:sourceIdentifier:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationViewControllerDelegate.html#/s:16MapboxNavigation0B22ViewControllerDelegateP010navigationcD0_33waypointCircleLayerWithIdentifier06sourceK00A4Maps0hI0VSgAA0bcD0C_S2StF)
    -   `NavigationViewControllerDelegate.navigationViewController(_:waypointSymbolLayerWithIdentifier:source:)` to [`NavigationViewControllerDelegate.navigationViewController(_:waypointSymbolLayerWithIdentifier:sourceIdentifier:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationViewControllerDelegate.html#/s:16MapboxNavigation0B22ViewControllerDelegateP010navigationcD0_33waypointSymbolLayerWithIdentifier06sourceK00A4Maps0hI0VSgAA0bcD0C_S2StF)
-   Removed the `NavigationViewController.origin` property.

### Banners and guidance instructions

The following symbols were renamed or replaced:

-   Removed the `InstructionsBannerViewDelegate.didDragInstructionsBanner(_:)` method.
-   Removed the `StatusView.delegate` and `StatusView.canChangeValue` properties and the `StatusViewDelegate` and `DeprecatedStatusViewDelegate` protocols.
-   Removed the `BottomBannerViewController(delegate:)` initializer.

> **Related content (guide): [User interface: Maneuver instructions](https://docs.mapbox.com/ios/navigation/guides/turn-by-turn-navigation/user-interface/#maneuver-instructions)**
> 
> Read more about how maneuver instructions work in the Navigation SDK v2.

### Location tracking

The following symbols were renamed or replaced:

-   Renamed the `RouterDataSource.locationProvider` and `EventsManagerDataSource.locationProvider` properties to [`RouterDataSource.locationManagerType`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/RouterDataSource.html#/s:16MapboxNavigation16RouterDataSourceP19locationManagerTypeAA0b8LocationG0Cmvp) and [`ActiveNavigationEventsManagerDataSource.locationManagerType`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Core%20Navigation%20Logic.html#/s:16MapboxNavigation06ActiveB23EventsManagerDataSourceP), respectively.
-   Renamed the `Router.advanceLegIndex()` method to [`Router.advanceLegIndex(completionHandler:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/Router.html#/s:16MapboxNavigation6RouterP15advanceLegIndex17completionHandleryys6ResultOyAA13RouteProgressCs5Error_pGcSg_tF) and the `PassiveLocationDataSource.updateLocation(_:)` method to [`PassiveLocationManager.updateLocation(_:completion:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/PassiveLocationManager.html#/s:16MapboxNavigation22PassiveLocationManagerC06updateD0_10completionySo10CLLocationCSg_ys6ResultOyAGs5Error_pGcSgtF). These methods are now asynchronous, and their completion handlers tell you whether the operation succeeded.
-   Removed the `RouteLegProgress.upComingStep` property.
-   Removed the `NavigationViewController.indexedRoute`, `NavigationService.indexedRoute`, and `Router.indexedRoute` properties in favor of [`NavigationViewController.indexedRouteResponse`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationViewController.html#/s:16MapboxNavigation0B14ViewControllerC20indexedRouteResponseAA07IndexedfG0Vvp), [`NavigationService.indexedRouteResponse`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationService.html#/s:16MapboxNavigation0B7ServiceP20indexedRouteResponseAA07IndexedeF0Vvp), and [`Router.indexedRouteResponse`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/Router.html#/s:16MapboxNavigation6RouterP20indexedRouteResponseAA07IndexedeF0Vvp), respectively. These properties are no longer writable; use the [`Router.updateRoute(with:routeOptions:completion:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/Router.html#/s:16MapboxNavigation6RouterP11updateRoute4with12routeOptions10completionyAA07IndexedE8ResponseV_0A10Directions0eH0CSgySbcSgtF) method to manually reroute the user.
-   Removed the `RouteProgress.indexedRoute` property.
-   The [`NavigationService.router`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationService.html#/s:16MapboxNavigation0B7ServiceP6routerAA6Router_pvp) and [`MapboxNavigationService.router`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/MapboxNavigationService.html#/s:16MapboxNavigation0aB7ServiceC6routerAA6Router_pvp) properties are no longer unsafe-unowned.
-   Renamed the `Router.updateRoute(with:routeOptions:)` method to [`Router.updateRoute(with:routeOptions:completion:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/Router.html#/s:16MapboxNavigation6RouterP11updateRoute4with12routeOptions10completionyAA07IndexedE8ResponseV_0A10Directions0eH0CSgySbcSgtF). The method is now asynchronous, with a new completion handler that is called when the update has completed.
-   `RouteOptions` no longer conforms to `NSCopying`. Use `JSONEncoder` and `JSONDecoder` to get a copy of the [`RouteOptions`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Extensions/RouteOptions.html) object round-tripped through JSON.
-   Renamed `RouteOptions.without(waypoint:)` to [`RouteOptions.without(_:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Extensions/RouteOptions.html#/s:16MapboxDirections12RouteOptionsC0A10NavigationE7withoutyAcA8WaypointCF).
-   Removed `Bundle.ensureSuggestedTileURLExists()`, `Bundle.suggestedTileURL` and `Bundle.suggestedTileURL(version:)`.
-   Removed the `Alert` enumeration and the `RouteAlert.alert`, `RouteAlert.distance`, `RouteAlert.length`, `RouteAlert.beginCoordinate`, `RouteAlert.endCoordinate`, `RouteAlert.beginSegmentIndex`, and `RouteAlert.endSegmentIndex` properties in favor of a consolidated [`RouteAlerts.roadObject`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Structs/RouteAlert.html#/s:16MapboxNavigation10RouteAlertV10roadObjectAA04RoadF0Vvp) property.

> **Related content (guide): [Location tracking](https://docs.mapbox.com/ios/navigation/v2/guides/get-started/location-tracking/)**
> 
> Read more about how location tracking works in the Navigation SDK v2.

#### Passive navigation

Passive navigation is also called free-drive navigation. The following symbols were renamed or replaced:

-   Renamed `PassiveLocationManager` to [`PassiveLocationProvider`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/PassiveLocationProvider.html) and `PassiveLocationDataSource` to [`PassiveLocationManager`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/PassiveLocationManager.html) for consistency with [`NavigationLocationProvider`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationLocationProvider.html) and [`NavigationLocationManager`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationLocationManager.html).
-   [`PassiveLocationProvider`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/PassiveLocationProvider.html) now conforms to the `LocationProvider` protocol instead of `MGLLocationManager`.
-   The [`PassiveLocationProvider.delegate`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/PassiveLocationProvider.html#/s:16MapboxNavigation23PassiveLocationProviderC8delegate0A4Maps0dE8Delegate_pSgvp) property is now of type `LocationProviderDelegate` instead of `MGLLocationManagerDelegate`.
-   Replaced `PassiveLocationManager.accuracyAuthorization()` with the [`PassiveLocationProvider.accuracyAuthorization`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/PassiveLocationProvider.html#/s:10MapboxMaps16LocationProviderP21accuracyAuthorizationSo010CLAccuracyF0Vvp) property, which now returns `CLAccuracyAuthorization` instead of `MBNavigationAccuracyAuthorization`.
-   Renamed `PassiveLocationManager.startUpdatingLocation(completionHandler:)` to [`PassiveLocationProvider.startUpdatingLocation()`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/PassiveLocationProvider.html#/s:10MapboxMaps16LocationProviderP013startUpdatingC0yyF). This method now runs synchronously like `CLLocationManager.startUpdatingLocation()`.

> **Related content (guide): [Free-drive navigation](https://docs.mapbox.com/ios/navigation/guides/free-drive/)**
> 
> Read more about how free-drive navigation, also referred to as passive navigation, works in the Navigation SDK v2.

### CarPlay

The following symbols were renamed or replaced:

-   Removed the `CarPlayNavigationDelegate.carPlayNavigationViewControllerDidArrive(_:)` method.
-   Renamed the `CarPlayManager.mapView` property to [`CarPlayManager.navigationMapView`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/CarPlayManager.html#/s:16MapboxNavigation14CarPlayManagerC17navigationMapViewAA0bgH0CSgvp).
-   Removed the `CarPlayManager.overviewButton` property.
-   Removed the `CarPlayNavigationViewController.drivingSide` property.
-   Renamed the `CarPlayNavigationDelegate` protocol to [`CarPlayNavigationViewControllerDelegate`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/CarPlayNavigationViewControllerDelegate.html) and the `CarPlayNavigationViewController.carPlayNavigationDelegate` property to [`CarPlayNavigationViewController.delegate`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/CarPlayNavigationViewController.html#/s:16MapboxNavigation07CarPlayB14ViewControllerC8delegateAA0cdbeF8Delegate_pSgvp).
-   The [`CarPlayNavigationViewController.styleManager`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/CarPlayNavigationViewController.html#/StyleManagerDelegate%20Methods) and [`CarPlayMapViewController.styleManager`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/CarPlayMapViewController.html#/StyleManagerDelegate%20Methods) properties are now read-only.
-   Moved the `CarPlaySearchController.searchTemplate(_:updatedSearchText:completionHandler:)`, `CarPlaySearchController.searchTemplate(_:searchTemplate:selectedResult:completionHandler:)` methods to the [`CarPlaySearchControllerDelegate`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/CarPlaySearchControllerDelegate.html) protocol. Renamed the `CarPlaySearchControllerDelegate.resultsOrNoResults(_:limit:)` method to [`CarPlaySearchControllerDelegate.searchResults(with:limit:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/CarPlaySearchControllerDelegate.html#/s:16MapboxNavigation31CarPlaySearchControllerDelegateP13searchResults4with5limitSaySo10CPListItemCGAI_SuSgtF).
-   Renamed the `CarPlayManagerDelegate.carPlayManager(_:navigationServiceAlong:routeIndex:routeOptions:desiredSimulationMode:)` method to [`CarPlayManagerDelegate.carPlayManager(_:navigationServiceFor:routeIndex:routeOptions:desiredSimulationMode:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/CarPlayManagerDelegate.html#/s:16MapboxNavigation22CarPlayManagerDelegateP03cardE0_20navigationServiceFor10routeIndex0K7Options21desiredSimulationModeAA0bI0_pSgAA0cdE0C_0A10Directions13RouteResponseVSiAM0rM0CAA0oP0OtF). It now returns an optional [`NavigationService`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationService.html); if it is `nil`, a [`MapboxNavigationService`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/MapboxNavigationService.html) will be used by default.
-   Renamed the `CarPlayManagerDelegate.carplayManagerShouldDisableIdleTimer(_:)` method to [`CarPlayManagerDelegate.carPlayManagerShouldDisableIdleTimer(_:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/CarPlayManagerDelegate.html#/s:16MapboxNavigation22CarPlayManagerDelegateP03cardE22ShouldDisableIdleTimerySbAA0cdE0CF).

> **Related content (guide): [CarPlay](https://docs.mapbox.com/ios/navigation/guides/system-integration/carplay/)**
> 
> Read more about how CarPlay integration works in the Navigation SDK v2.

### User feedback

The following symbols were renamed or replaced:

-   The `ActiveNavigationEventsManagerDataSource.router`, [`NavigationService.eventsManager`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Protocols/NavigationService.html#/s:16MapboxNavigation0B7ServiceP13eventsManagerAA0b6EventsE0Cvp), and [`MapboxNavigationService.eventsManager`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/MapboxNavigationService.html#/s:16MapboxNavigation0aB7ServiceC13eventsManagerAA0b6EventsE0Cvp) properties are no longer unsafe-unowned.
-   Removed the `EventsManager` type alias.
-   Renamed the `FeedbackViewController(eventsManager:)` initializer to [`FeedbackViewController(eventsManager:type:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/FeedbackViewController.html#/s:16MapboxNavigation22FeedbackViewControllerC13eventsManager4typeAcA0b6EventsG0C_AA0cdE4TypeOtcfc). You can now customize the view controller to show only the feedback types specific to passive navigation.
-   Renamed the `FeedbackType` enumeration to [`ActiveNavigationFeedbackType`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Enums/ActiveNavigationFeedbackType.html) and the `EventsManagerDataSource` protocol to [`ActiveNavigationEventsManagerDataSource`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Core%20Navigation%20Logic.html#/s:16MapboxNavigation06ActiveB23EventsManagerDataSourceP).

> **Related content (guide): [Feedback](https://docs.mapbox.com/ios/navigation/guides/advanced/feedback/)**
> 
> Read more about how user feedback works in the Navigation SDK v2.

## Other migration steps

### Configuring storyboards

If your storyboard has a segue to `NavigationViewController` in Navigation.storyboard, you have to call the [`NavigationViewController.prepareViewLoading(routeResponse:routeIndex:routeOptions:navigationOptions:)`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationViewController.html#/s:16MapboxNavigation0B14ViewControllerC07prepareC7Loading13routeResponse0G5Index0G7Options010navigationJ0Sb0A10Directions05RouteH0V_SiAI0mJ0CAA0bJ0CSgtF) method in your implementation of the `UIViewController.prepare(for:sender:)` method.

### Tile cache cleanup

When migrating make sure you have cleaned up the old navigation tiles cache folder to reclaim disk space:

-   Navigation SDK v2 caches navigation tiles in a default folder under `<APP_FOLDER>/Library/Caches/<APP_BUNDLE_ID>/tiles`.
-   Previous versions of Navigation SDK cache tiles in a default folder under `<APP_FOLDER>/Library/Caches/<APP_BUNDLE_ID>/.mapbox`.
-   Caches from previous versions of the Navigation SDK are not compatible with v2.
-   Delete any folders used for caching with previous versions of the SDK including a default one.
    -   [`NavigationSettings.shared.tileStoreConfiguration`](https://docs.mapbox.com/ios/navigation/api/2.0.0/Classes/NavigationSettings.html#/s:16MapboxNavigation0B8SettingsC6sharedACvpZ) enables you to specify a path where navigation and map tiles will be saved. If a custom directory was used, you should remove it, too.
    -   Be sure to configure the custom path *before* starting a free drive or an active guidance session if you don't want to use the default location.

### Migrating a project from framework bundles to XCFrameworks

Switching from discrete framework bundles to XCFrameworks requires a few changes to your project. Follow these migration steps to switch:

1.  Delete your `Carthage` folder to remove any existing framework bundles.
2.  Build new XCFrameworks by running `carthage bootstrap --platform iOS --use-xcframeworks --use-netrc`.
3.  Remove references to the old frameworks in each of your targets:
    -   Delete references to Carthage frameworks from the target's *Frameworks, Libraries, and Embedded Content* section and/or its *Link Binary with Libraries* build phase.
    -   Delete references to Carthage frameworks from any *Copy Files* build phases.
    -   Delete the target's `carthage copy-frameworks` build phase, if present.
4.  Add references to XCFrameworks in each of your targets:
    -   For an application target: In the *General* settings tab, in the *Frameworks, Libraries, and Embedded Content* section, drag and drop each XCFramework you use from the Carthage/Build folder on disk.
    -   For a framework target: In the *Build Phases* tab, in a *Link Binary with Libraries* phase, drag and drop each XCFramework you use from the Carthage/Build folder on disk.

## Need help?

If you have any questions, [contact Mapbox's support team](https://www.mapbox.com/contact/support/).