Releases: mapbox/mapbox-navigation-ios
Releases · mapbox/mapbox-navigation-ios
v0.22.0
Packaging
- Added a dependency on the Mapbox Navigation Native framework. If you use Carthage to install this framework, your target should also link against
MapboxNavigationNative.framework. (#1618)
User location
- Added a
NavigationServiceprotocol implemented by classes that provide location awareness functionality. Our default implementation,MapboxNavigationServiceconforms to this protocol. (#1602)- Added a new
Routerprotocol, which allows for custom route-following logic. Our default implementation,RouteController, conforms to this protocol. NavigationViewController.init(for:styles:directions:styles:routeController:locationManager:voiceController:eventsManager)has been renamedNavigationViewController.init(for:styles:navigationService:voiceController:).NavigationViewController.routeControllerhas been replaced byNavigationViewController.navigationService.- If you currently use
RouteControllerdirectly, you should migrate toMapboxNavigationService. - If you currently use
SimulatedLocationManagerdirectly, you should instead passSimulationOption.alwaysintoMapboxNavigationService(route:directions:locationSource:eventsManagerType:simulating:). - Note: the
MapboxNavigationService, by default, will start simulating progress if more than 1.5 seconds elapses without any update from the GPS. This can happen when simulating locations in Xcode, or selecting the "Custom Location" simulation option in the iOS Simulator. This is normal behavior.
- Added a new
- Improved the reliability of off-route detection. (#1618)
User interface
StyleManagerDelegate.locationFor(styleManager:)has been renamed toStyleManagerDelegate.location(for:)(#1724)- Fixed inaccurate maneuver arrows along the route line when the route doubles back on itself. (#1735)
- Added an
InstructionsBannerView.swipeableproperty that allows the user to swipe the banner to the side to preview future steps. TheInstructionsBannerViewDelegate.didDragInstructionsBanner(_:)method has been deprecated in favor ofInstructionsBannerViewDelegate.didSwipeInstructionsBanner(_:swipeDirection:). (#1750) NavigationMapViewno longer mutates its own frame rate implicitly. A newNavigationMapView.updatePreferredFrameRate(for:)method allows you to update the frame rate in response to route progress change notifications. TheNavigationMapView.minimumFramesPerSecondproperty determines the frame rate while the application runs on battery power. By default, the map views inNavigationViewControllerand CarPlay’s navigation activity animate at a higher frame rate on battery power than before. (#1749)- Fixed a crash that occurred when the end of route view controller appears, showing the keyboard. (#1754)
Documentation is available online or within Xcode.
v0.21.0
User interface
- In CarPlay-enabled applications on iOS 12, this SDK now displays a map, search interface, and turn-by-turn navigation experience on the connected CarPlay device. The CarPlay screen is managed by the shared
CarPlayManagerobject, which you can configure by implementing theCarPlayManagerDelegateprotocol. (#1714) - Added the
Style.previewMapStyleURLproperty for customizing the style displayed by a preview map. (#1695)
User location
- Breaking change: The
eventsManagerargument ofRouteController(along:directions:locationManager:eventsManager:)is now required.NavigationViewController(for:directions:styles:locationManager:voiceController:eventsManager:)now has an optionaleventsManagerargument, which is passed to any instance ofRouteControllercreated as a result of rerouting. (#1671) - Fixed issues where the user puck would overshoot a turn or drift away from a curved road. (#1710)
- Fixed incorrect conversions to inches in
DistanceFormatter. (#1699) - Fixed several crashes related to telemetry collection. (#1668)
Documentation is available online or within Xcode.
v0.20.1
- Upgraded mapbox-events-ios to v0.5.0 to avoid a potential incompatibility when using Carthage to install the SDK.
- Fixed a bug which prevented automatic day and night style switching. (#1629)
Documentation is available online or within Xcode.
v0.20.0
User interface
- While traveling on a numbered road, the route number is displayed in a shield beside the current road name at the bottom of the map. (#1576)
- Added the
shouldManageApplicationIdleTimerflag toNavigationViewControllerto allow applications to opt out of automaticUIApplication.isIdleTimerDisabledmanagement. (#1591) - Added various methods, properties, and initializers to
StatusView, allowing you to use it in a custom user interface. (#1612) - Added
StyleManager.automaticallyAdjustsStyleForTimeOfDay,StyleManager.delegate, andStyleManager.stylesproperties so that you can control same time-based style switching just asNavigationViewControllerdoes. (#1617) - Fixed an issue where the banner was stuck on rerouting past the reroute threshold when simulating navigation. (#1583)
- Fixed an issue where the banner appears in the wrong colors after you tap the Resume button. (#1588, #1589)
NavigationMapView’s user puck now responds to changes to the safe area insets while tracking the user’s location, matching the behavior of the map camera. (#1653)- Added
StepsViewControllerDelegateandInstructionsBannerViewDelegatewhich makes it possible to listen in on tap events that occur inStepsViewControllerandInstructionsBannerView. (#1633)
Feedback
- Added a
FeedbackViewControllerclass for soliciting feedback from the user in a custom user interface. (#1605) - Replaced
NavigationViewControllerDelegate.navigationViewControllerDidOpenFeedback(_:)withFeedbackViewControllerDelegate.feedbackViewControllerDidOpen(_:),NavigationViewControllerDelegate.navigationViewControllerDidCancelFeedback(_:)withFeedbackViewControllerDelegate.feedbackViewController(_:didSend:uuid:), andNavigationViewControllerDelegate.navigationViewController(_:didSendFeedbackAssigned:feedbackType)withFeedbackViewControllerDelegate.feedbackViewControllerDidCancel(_:). (#1605) - Fixed a crash that occurred when the end of route view controller appears, showing the keyboard. (#1599)
Other changes
- Added a
MapboxVoiceController.audioPlayerproperty. You can use this property to interrupt a spoken instruction or adjust the volume. (#1596) - Fixed a memory leak when
RouteController.isDeadReckoningEnabledis enabled. (#1624)
Documentation is available online or within Xcode.
v0.19.2
- The
MGLStyle.navigationGuidanceDayStyleURLandMGLStyle.navigationGuidanceNightStyleURLproperties now return version 4 of the Mapbox Navigation Guidance Day and Night styles, respectively. These styles indicate incidents such as road closures and detours. (#1619) - Added an
MGLMapView.showsIncidentsproperty to toggle the visibility of any Mapbox Incidents data on a map view. (#1613)
Documentation is available online or within Xcode.
v0.19.1
v0.19.0
Packaging
- Moved guides and examples to a new Mapbox Navigation SDK for iOS website. (#1552)
- Applications intended for use in mainland China can set the
MGLMapboxAPIBaseURLkey in Info.plist tohttps://api.mapbox.cn/to use China-optimized APIs. This setting causesNavigationMapViewto default to China-optimized day and night styles with places and roads labeled in Simplified Chinese. (#1558)
User interface
- Fixed an issue where selecting a step from the steps list would take the user to the wrong step. (#1524)
- The
StyleManagerDelegate.locationFor(styleManager:)method’s return value is now optional. (#1523) NavigationViewControllersmoothly fades between light and dark status bars. (#1535)- Renamed the
InstructionsBannerView.updateInstruction(_:)method toInstructionsBannerView.update(for:). Added theNextBannerView.update(for:)andLanesView.update(for:)methods. These methods are intended to be called in response toNotification.Name.routeControllerDidPassVisualInstructionPointif the views are used outside aNavigationViewController. By contrast,InstructionsBannerView.updateDistance(for:)should be called on every location update. (#1514) - Added the
ManeuverView.visualInstructionandManeuverView.drivingSideproperties. (#1514)
Documentation is available online or within Xcode.
v0.18.1
Packaging
- Increased the minimum deployment target of Core Navigation to iOS 9. (#1494)
User interface
- Added
NavigationMapView.recenterMap()for recentering the map if a user gesture causes it to stop following the user. (#1471) - Deprecated
NavigationViewController.usesNightStyleInsideTunnels. Style switching is enabled as a side effect ofTunnelIntersectionManager.tunnelSimulationEnabled, which is set totrueby default. ([#1489] - Fixed an issue where the user location view slid around after the user pressed the Overview button. #1506
Documentation is available online or within Xcode.
v0.18.0
User Interface
- Added support for generic route shields. Image-backed route shields also now display as generic (instead of plain text) while the SDK loads the image. #1190, #1417
- Fixed an issue when going into overhead mode with a short route. #1456
Core Navigation
TunnelIntersectionManagerDelegatemethods no longer take a completion handler argument. (#1414)- Added the ability to render more than 1 alternate route. #1372
NavigationMapViewDelegate.navigationMapView(_:shapeFor:)Now expects an array ofRoute. The first route will be rendered as the main route, all subsequent routes will be rendered as alternate routes.- Animating the user through tunnels and automatically switching the map style when entering a tunnel is now on by default. #1449
- Adds
RouteControllerDelegate.routeController(_:shouldPreventReroutesWhenArrivingAt:waypoint:)which is called each time a driver arrives at a waypoint. By default, this method returns true and prevents rerouting upon arriving. Progress updates still occur. #1454
Documentation is available online or within Xcode.
v0.17.0
Packaging
- Upgraded to the Mapbox Maps SDK for iOS v4.0.0. If you have customized the route map’s appearance, you may need to migrate your code to use expressions instead of style functions. (#1076)
- Added a Korean localization. (#1346)
User interface
- Exit indications are now drawn accurately with a correct exit heading. (#1288)
- Added the
NavigationViewControllerDelegate.navigationViewController(_:roadNameAt:)method for customizing the contents of the road name label that appears towards the bottom of the map view. (#1309) - If the SDK tries but fails to reroute the user, the “Rerouting…” status view no longer stays visible permanently. (#1357)
- Completed waypoints now remain on the map but are slightly translucent. (#1364)
- Fixed an issue preventing
NavigationViewController.navigationMapView(_:simplifiedShapeDescribing:)(nowNavigationViewController.navigationMapView(_:simplifiedShapeFor:)) from being called. (#1413)
Spoken instructions
- Fixed an issue causing the wrong instructions to be spoken. (#1396)
User location
- The
RouteController.routeProgressproperty is now available in Objective-C. (#1323) - Added a
RouteController.tunnelSimulationEnabledoption that keeps the user location indicator moving steadily while the user travels through a tunnel and GPS reception is unreliable. (#1218)
Other changes
DistanceFormatter,ReplayLocationManager,SimulatedLocationManager,LanesView, andManueverVieware now subclassable. (#1345)- Renamed many
NavigationViewControllerandNavigationMapViewDelegatemethods (#1364, #1338, #1318, #1378, #1413):NavigationViewControllerDelegate.navigationViewControllerDidCancelNavigation(_:)toNavigationViewControllerDelegate.navigationViewControllerDidDismiss(_:byCanceling:)-[MBNavigationViewControllerDelegate navigationViewController:didArriveAt:]to-[MBNavigationViewControllerDelegate navigationViewController:didArriveAtWaypoint:]in Objective-CNavigationViewControllerDelegate.navigationMapView(_:routeStyleLayerWithIdentifier:source:)toNavigationViewControllerDelegate.navigationViewController(_:routeStyleLayerWithIdentifier:source:)NavigationViewControllerDelegate.navigationMapView(_:routeCasingStyleLayerWithIdentifier:source:)toNavigationViewControllerDelegate.navigationViewController(_:routeCasingStyleLayerWithIdentifier:source:)NavigationViewControllerDelegate.navigationMapView(_:shapeFor:)toNavigationViewControllerDelegate.navigationViewController(_:shapeFor:)NavigationViewControllerDelegate.navigationMapView(_:simplifiedShapeFor:)toNavigationViewControllerDelegate.navigationViewController(_:simplifiedShapeFor:)NavigationViewControllerDelegate.navigationMapView(_:waypointStyleLayerWithIdentifier:source:)toNavigationViewControllerDelegate.navigationViewController(_:waypointStyleLayerWithIdentifier:source:)NavigationViewControllerDelegate.navigationMapView(_:waypointSymbolStyleLayerWithIdentifier:source:)toNavigationViewControllerDelegate.navigationViewController(_:waypointSymbolStyleLayerWithIdentifier:source:)NavigationViewControllerDelegate.navigationMapView(_:shapeFor:legIndex:)toNavigationViewControllerDelegate.navigationViewController(_:shapeFor:legIndex:)NavigationViewControllerDelegate.navigationMapView(_:didTap:)toNavigationViewControllerDelegate.navigationViewController(_:didSelect:)NavigationViewControllerDelegate.navigationMapView(_:imageFor:)toNavigationViewControllerDelegate.navigationViewController(_:imageFor:)NavigationViewControllerDelegate.navigationMapView(_:viewFor:)toNavigationViewControllerDelegate.navigationViewController(_:viewFor:)NavigationViewControllerDelegate.navigationViewController(_:didSend:feedbackType:)toNavigationViewControllerDelegate.navigationViewController(_:didSendFeedbackAssigned:feedbackType:)-[MBNavigationViewControllerDelegate navigationViewController:shouldDiscard:]to-[MBNavigationViewControllerDelegate navigationViewController:shouldDiscardLocation:]in Objective-C-[MBNavigationViewControllerDelegate navigationViewController:roadNameAt:]to-[MBNavigationViewControllerDelegate navigationViewController:roadNameAtLocation:]NavigationMapViewDelegate.navigationMapView(_:shapeDescribing:)toNavigationMapViewDelegate.navigationMapView(_:shapeFor:).NavigationMapViewDelegate.navigationMapView(_:simplifiedShapeDescribing:)toNavigationMapViewDelegate.navigationMapView(_:simplifiedShapeFor:).-[MBNavigationMapViewDelegate navigationMapView:shapeDescribingWaypoints:legIndex:]to-[MBNavigationMapViewDelegate navigationMapView:shapeForWaypoints:legIndex:]in Objective-C
RouteController.recordFeedback(type:description:)now returns aUUIDinstead of a string. SomeRouteControllermethods have been renamed to acceptUUIDs as arguments instead of strings. (#1413)- Renamed
TunnelIntersectionManagerDelegate.tunnelIntersectionManager(_:willEnableAnimationAt:callback:)toTunnelIntersectionManagerDelegate.tunnelIntersectionManager(_:willEnableAnimationAt:completionHandler:)andTunnelIntersectionManagerDelegate.tunnelIntersectionManager(_:willDisableAnimationAt:callback:)toTunnelIntersectionManagerDelegate.tunnelIntersectionManager(_:willDisableAnimationAt:completionHandler:). (#1413)
Documentation is available online or within Xcode.