diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e3e671bac..3acba93a7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,15 +5,36 @@ ### Packaging * Carthage v0.35 or above is now required for installing this SDK if you use Carthage. ([`81a36d0`](https://github.com/mapbox/mapbox-navigation-ios/commit/81a36d090e8a0602b7144ee7697b7857675b496f)) -* For the time being, MapboxCoreNavigation.framework depends on a build of MapboxNavigationNative.framework that is only available to authorized beta testers. Please contact your Mapbox sales representative or [support team](https://support.mapbox.com/) to learn more about the beta testing program. ([#2412](https://github.com/mapbox/mapbox-navigation-ios/pull/2412)) -* MapboxNavigation depends on Mapbox Maps SDK for iOS v6.0.0. Before CocoaPods or Carthage can download Mapbox.framework, you need to create a special-purpose access token. See [the updated installation instructions in the readme](./README.md#installing-the-latest-prerelease) for more details. ([#2437](https://github.com/mapbox/mapbox-navigation-ios/pull/2437)) +* MapboxNavigation depends on Mapbox Maps SDK for iOS v6.0.0, and MapboxCoreNavigation depends on builds of MapboxNavigationNative and MapboxCommon that require authentication. Before CocoaPods or Carthage can download Mapbox.framework, MapboxNavigationNative.framework, and MapboxCommon.framework, you need to create a special-purpose access token. See [the updated installation instructions in the readme](./README.md#installing-the-latest-prerelease) for more details. ([#2437](https://github.com/mapbox/mapbox-navigation-ios/pull/2437), [#2477](https://github.com/mapbox/mapbox-navigation-ios/pull/2477)) +* If you install this SDK using Carthage, you need to also add MapboxCommon.framework to your application target’s Embed Frameworks build phase. ([#2477](https://github.com/mapbox/mapbox-navigation-ios/pull/2477)) * Xcode 11.4.1 or above is now required for building this SDK from source. ([#2417](https://github.com/mapbox/mapbox-navigation-ios/pull/2417)) * Enabled MAU billing by default, so that SDKs usage of Mapbox APIs is [billed](https://www.mapbox.com/pricing/) together based on [monthly active users](https://docs.mapbox.com/help/glossary/monthly-active-users/) rather than individually by HTTP request. If you prefer to still use request-based billing, set the `MBXNavigationBillingMethod` key in Info.plist to `request` ([#2405](https://github.com/mapbox/mapbox-navigation-ios/pull/2405). -* Added Greek and Turkish localizations. ([#2385](https://github.com/mapbox/mapbox-navigation-ios/pull/2385), [#2475](https://github.com/mapbox/mapbox-navigation-ios/pull/2475)) -* Upgraded to mapbox-directions-swift [v0.33.0](https://github.com/mapbox/mapbox-directions-swift/releases/tag/v0.33.0). ([#2483](https://github.com/mapbox/mapbox-navigation-ios/pull/2483)) +* Added Greek and Turkish localizations. ([#2385](https://github.com/mapbox/mapbox-navigation-ios/pull/2385), [#2475](https://github.com/mapbox/mapbox-navigation-ios/pull/2475), [valhalla/valhalla#2438](https://github.com/valhalla/valhalla/pull/2438)) +* Upgraded to [MapboxDirections v0.33.0](https://github.com/mapbox/mapbox-directions-swift/releases/tag/v0.33.0). ([#2483](https://github.com/mapbox/mapbox-navigation-ios/pull/2483)) + +### User interface + +* A portion of the route line now disappears behind the user puck as the user travels along the route during turn-by-turn navigation. ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377)) +* As the user approaches certain junctions, an enlarged illustration of the junction appears below the top banner to help the user understand a complex maneuver. These junction views require only appear when the relevant data is available. Contact your Mapbox sales representative or [support team](https://support.mapbox.com/) for access to the junction views feature. ([#2408](https://github.com/mapbox/mapbox-navigation-ios/pull/2408)) +* Removed the `NavigationViewControllerDelegate.navigationViewController(_:imageFor:)` and `NavigationViewControllerDelegate.navigationViewController(_:viewFor:)` methods in favor of `MGLMapViewDelegate.mapView(_:imageFor:)` and `MGLMapViewDelegate.mapView(_:viewFor:)`, respectively. ([#2396](https://github.com/mapbox/mapbox-navigation-ios/pull/2396)) +* Removed `NavigationMapViewDelegate.navigationMapView(_:routeStyleLayerWithIdentifier:source:)`, `NavigationMapViewDelegate.navigationMapView(_:routeCasingStyleLayerWithIdentifier:source:)` in favor of four new delegate methods to customize the route styling ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377)): + * `NavigationMapViewDelegate.navigationMapView(_:mainRouteStyleLayerWithIdentifier:source:)` to style the main route. + * `NavigationMapViewDelegate.navigationMapView(_:mainRouteCasingStyleLayerWithIdentifier:source:)` to style the casing of the main route. + * `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteStyleLayerWithIdentifier:source:)` to style alternative routes. + * `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteCasingStyleLayerWithIdentifier:source:)` to style the casing of alternative routes. + * Fixed an issue where the casing for the main route would not overlap alternative routes. ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377)) + +### Feedback + +* Updated `FeedbackType` enum to reflect new top level feedback categories and introduced new `FeedbackSubType`s to support a more granular feedback mechanism. ([#2419](https://github.com/mapbox/mapbox-navigation-ios/pull/2419)) +* Updated image icons for top-level feedback collection view items. ([#2419](https://github.com/mapbox/mapbox-navigation-ios/pull/2419), [#2421](https://github.com/mapbox/mapbox-navigation-ios/pull/2421)) +* The feedback screen no longer dismisses automatically after 10 seconds. ([#2420](https://github.com/mapbox/mapbox-navigation-ios/pull/2420)) +* Fixed warnings in Interface Builder that prevented styling of UI components in `EndOfRouteViewController`. ([#2518](https://github.com/mapbox/mapbox-navigation-ios/pull/2518)) ### User location +* Improved the accuracy of location tracking and off-route detection. ([#2319](https://github.com/mapbox/mapbox-navigation-ios/pull/2319)) +* Fixed an issue where location tracking would pause at the beginning of a route after setting `RouteOptions.shapeFormat` to `RouteShapeFormat.polyline` or `RouteShapeFormat.geoJSON`. Note that you most likely do not need to override the default value of `RouteShapeFormat.polyline6`: this is the least bandwidth-intensive format, and `Route.shape` and `RouteStep.shape` are set to `LineString`s regardless. ([#2319](https://github.com/mapbox/mapbox-navigation-ios/pull/2319)) * Fixed an issue where various delegate methods omitted `CLLocation.courseAccuracy` and `CLLocation.speedAccuracy` properties from passed-in `CLLocation` objects when using `RouteController`, even when these properties are provided by Core Location on iOS 13.4 and above. ([#2417](https://github.com/mapbox/mapbox-navigation-ios/pull/2417)) * Fixed issues where the user puck would sometimes drift away from the route line even though the user was following the route. ([#2412](https://github.com/mapbox/mapbox-navigation-ios/pull/2412), [#2417](https://github.com/mapbox/mapbox-navigation-ios/pull/2417)) * Fixed an issue where `RouteController` took longer than usual to detect that the user had gone off-route. ([#2412](https://github.com/mapbox/mapbox-navigation-ios/pull/2412)) @@ -24,14 +45,13 @@ * `RouteController` now tracks the user’s location more accurately within roundabouts. ([#2417](https://github.com/mapbox/mapbox-navigation-ios/pull/2417)) * Fixed an issue where departure instructions were briefly missing when beginning turn-by-turn navigation. ([#2417](https://github.com/mapbox/mapbox-navigation-ios/pull/2417)) -### User location - -* Improved the accuracy of location tracking and off-route detection. ([#2319](https://github.com/mapbox/mapbox-navigation-ios/pull/2319)) -* Fixed an issue where location tracking would pause at the beginning of a route after setting `RouteOptions.shapeFormat` to `RouteShapeFormat.polyline` or `RouteShapeFormat.geoJSON`. Note that you most likely do not need to override the default value of `RouteShapeFormat.polyline6`: this is the least bandwidth-intensive format, and `Route.shape` and `RouteStep.shape` are set to `LineString`s regardless. ([#2319](https://github.com/mapbox/mapbox-navigation-ios/pull/2319)) - ### Offline navigation +* `NavigationDirectionsCompletionHandler` now accepts the original tile directory URL passed into `NavigationDirections.configureRouter(tilesURL:completionHandler:)`; the number of tiles added is no longer passed in. ([#2477](https://github.com/mapbox/mapbox-navigation-ios/pull/2477)) * Fixed a crash that occurred after setting `RouteOptions.shapeFormat` to `RouteShapeFormat.geoJSON`. ([valhalla/valhalla#1867](https://github.com/valhalla/valhalla/pull/1867)) +* Fixed a crash caused by a side street that loops back to a main road. ([valhalla/valhalla#2385](https://github.com/valhalla/valhalla/pull/2385)) +* Fixed a crash caused by a turn channel leading away from a roundabout. ([valhalla/valhalla#2463](https://github.com/valhalla/valhalla/pull/2463)) +* Added Dutch and Japanese spoken instructions, for consistency with the Mapbox Directions API. ([valhalla/valhalla#2464](https://github.com/valhalla/valhalla/pull/2464), [valhalla/valhalla#2432](https://github.com/valhalla/valhalla/pull/2432)) * Fixed an issue where some routes had unreasonably long expected travel times. ([valhalla/valhalla#2102](https://github.com/valhalla/valhalla/pull/2102)) * Fixed incorrect routing at some intersections of divided roads where there are turn restrictions. ([valhalla/valhalla#2109](https://github.com/valhalla/valhalla/pull/2109)) * Fixed issues where routes would sometimes require divebombing. ([valhalla/valhalla#1931](https://github.com/valhalla/valhalla/pull/1931)) @@ -44,33 +64,20 @@ * Turn lane indications are now shown below the turn banner as when navigating online. ([valhalla/valhalla#1830](https://github.com/valhalla/valhalla/pull/1830), [valhalla/valhalla#1859](https://github.com/valhalla/valhalla/pull/1859)) * Fixed an issue where the `RouteStep.expectedTravelTime` properties of each step did not add up to the `RouteLeg.expectedTravelTime` property. ([valhalla/valhalla#2195](https://github.com/valhalla/valhalla/pull/2195)) * Fixed an issue where a forward- or backward-only speed limit was not considered when calculating some expected travel times. ([valhalla/valhalla#2198](https://github.com/valhalla/valhalla/pull/2198)) -* Suppressed extraneous `ManeuverType.reachFork` maneuvers. ([valhalla/valhalla#1886](https://github.com/valhalla/valhalla/pull/1886), [valhalla/valhalla#1909](https://github.com/valhalla/valhalla/pull/1909), [valhalla/valhalla#1928](https://github.com/valhalla/valhalla/pull/1928)) +* Suppressed extraneous maneuvers. ([valhalla/valhalla#1886](https://github.com/valhalla/valhalla/pull/1886), [valhalla/valhalla#1909](https://github.com/valhalla/valhalla/pull/1909), [valhalla/valhalla#1928](https://github.com/valhalla/valhalla/pull/1928), [valhalla/valhalla#2436](https://github.com/valhalla/valhalla/pull/2436)) * A spoken instruction about a `ManeuverType.merge` maneuver now indicates whether to merge to the left or the right, as when navigating online. ([valhalla/valhalla#1892](https://github.com/valhalla/valhalla/pull/1892), [valhalla/valhalla#1989](https://github.com/valhalla/valhalla/pull/1989)) -* Spoken instructions for `ManeuverType.exitRoundabout` and `ManeuverType.exitRotary` maneuvers now indicate the outlet road name or destination if available. ([valhalla/valhalla#2378](https://github.com/valhalla/valhalla/pull/2378)) +* Spoken instructions for `ManeuverType.exitRoundabout`, `ManeuverType.exitRotary`, `ManeuverType.reachFork`, and `ManeuverType.merge` maneuvers now indicate the outlet road name or destination if available. ([valhalla/valhalla#2378](https://github.com/valhalla/valhalla/pull/2378), [valhalla/valhalla#2389](https://github.com/valhalla/valhalla/pull/2389)) +* Visual and spoken instructions for `ManeuverType.turn` and `ManeuverType.reachFork` now indicate the name of the intersection, if available. ([valhalla/valhalla#2386](https://github.com/valhalla/valhalla/pull/2386)) * Fixed ungrammatical spoken instructions at sharp turns in English. ([valhalla/valhalla#2226](https://github.com/valhalla/valhalla/pull/2226)) * Fixed an issue where spoken and visual instructions sometimes omitted the cardinal direction after a route number in the United States. ([valhalla/valhalla#1917](https://github.com/valhalla/valhalla/pull/1917)) +* Fixed an issue where visual instructions sometimes included duplicate content in `VisualInstructionBanner.primaryInstruction` and `VisualInstructionBanner.secondaryInstruction`. ([#2477](https://github.com/mapbox/mapbox-navigation-ios/pull/2477)) * A spoken instruction about a `ManeuverType.takeOffRamp` maneuver no longer specifies the side of the road if the ramp branches off the slow lane (on the right side in regions that drive on the right). ([valhalla/valhalla#1990](https://github.com/valhalla/valhalla/pull/1990)) * Improved the timing of spoken instructions for `ManeuverType.takeOffRamp` maneuvers along high-speed roads. ([#2417](https://github.com/mapbox/mapbox-navigation-ios/pull/2417)) * Improved the timing of visual instructions when two maneuvers are spaced close together. ([#2417](https://github.com/mapbox/mapbox-navigation-ios/pull/2417)) -### Feedback -* Updated `FeedbackType` enum to reflect new top level feedback categories and introduced new `FeedbackSubType`s to support a more granular feedback mechanism. ([#2419](https://github.com/mapbox/mapbox-navigation-ios/pull/2419)) -* Updated image icons for top-level feedback collection view items. ([#2419](https://github.com/mapbox/mapbox-navigation-ios/pull/2419), [#2421](https://github.com/mapbox/mapbox-navigation-ios/pull/2421)) -* The feedback screen no longer dismisses automatically after 10 seconds. ([#2420](https://github.com/mapbox/mapbox-navigation-ios/pull/2420)) - ### Other changes -* Removed `NavigationMapViewDelegate.navigationMapView(_:routeStyleLayerWithIdentifier:source:)`, `NavigationMapViewDelegate.navigationMapView(_:routeCasingStyleLayerWithIdentifier:source:)` in favor of four new delegate methods to customize the route styling ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377)): - * `NavigationMapViewDelegate.navigationMapView(_:mainRouteStyleLayerWithIdentifier:source:)` to style the main route. - * `NavigationMapViewDelegate.navigationMapView(_:mainRouteCasingStyleLayerWithIdentifier:source:)` to style the casing of the main route. - * `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteStyleLayerWithIdentifier:source:)` to style alternative routes. - * `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteCasingStyleLayerWithIdentifier:source:)` to style the casing of alternative routes. -* Added the ability for the route line to disappear as the puck travels along a route during turn-by-turn navigation. ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377)) -* Fixed an issue where the casing for the main route would not overlap alternative routes. ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377)) -* Removed the `NavigationViewControllerDelegate.navigationViewController(_:imageFor:)` and `NavigationViewControllerDelegate.navigationViewController(_:viewFor:)` methods in favor of `MGLMapViewDelegate.mapView(_:imageFor:)` and `MGLMapViewDelegate.mapView(_:viewFor:)`, respectively. ([#2396](https://github.com/mapbox/mapbox-navigation-ios/pull/2396)) * Fixed memory leaks after disconnecting the application from CarPlay. ([#2470](https://github.com/mapbox/mapbox-navigation-ios/pull/2470)) -* As the user approaches certain junctions, an enlarged illustration of the junction appears below the top banner to help the user understand a complex maneuver. These junction views require only appear when the relevant data is available. Contact your Mapbox sales representative or [support team](https://support.mapbox.com/) for access to the junction views feature. ([#2408](https://github.com/mapbox/mapbox-navigation-ios/pull/2408)) -* Fixed warnings which were prevening styling of UI components in `EndOfRouteViewController`. ([#2518](https://github.com/mapbox/mapbox-navigation-ios/pull/2518)) ## v0.40.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a606acf57f..8f3f025ec4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,17 +21,23 @@ When reporting a bug in the navigation SDK itself, please indicate: To build this SDK, you need Xcode 11.4.1 and [Carthage](https://github.com/Carthage/Carthage/) v0.35: -1. Create a [Bintray](https://bintray.com/mapbox) account, then [request to be added to the Mapbox Navigation SDK beta testing program](https://docs.google.com/forms/d/1mzknLZf5W9o8-KnQJ1GiYyG2grXVRqNxqHruWYTRVPc/viewform). - -1. [Get a Bintray API key](https://bintray.com/profile/edit). +1. Go to your [Mapbox account dashboard](https://account.mapbox.com/) and create an access token that has the `DOWNLOADS:READ` scope. **PLEASE NOTE: This is not the same as your production Mapbox API token. Make sure to keep it private and do not insert it into any Info.plist file.** Create a file named `.netrc` in your home directory if it doesn’t already exist, then add the following lines to the end of the file: + ``` + machine api.mapbox.com + login mapbox + password PRIVATE_MAPBOX_API_TOKEN + ``` + where _PRIVATE_MAPBOX_API_TOKEN_ is your Mapbox API token with the `DOWNLOADS:READ` scope. -1. Add or append to a .netrc file in your home directory: +1. _(Optional)_ Clear your Carthage caches: + ```bash + rm -rf ~/Library/Caches/carthage/ ~/Library/Caches/org.carthage.CarthageKit/binaries/{MapboxAccounts,MapboxCommon-ios,MapboxNavigationNative,mapbox-ios-sdk-dynamic} ``` - machine dl.bintray.com - login username@mapbox - password BINTRAY_API_KEY + +1. Create a [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#github-repositories) with the following dependency: + ```cartfile + github "mapbox/mapbox-navigation-ios" "v1.0.0-beta.1" ``` - where _username_ is your user name and _BINTRAY_API_KEY_ is your Bintray API key. 1. Run `carthage bootstrap --platform iOS --cache-builds --use-netrc`. diff --git a/Cartfile b/Cartfile index 62fead87c5..1c7e9aed7a 100644 --- a/Cartfile +++ b/Cartfile @@ -1,6 +1,7 @@ binary "https://www.mapbox.com/ios-sdk/MapboxAccounts.json" ~> 2.3.0 binary "https://api.mapbox.com/downloads/v2/carthage/mobile-maps/mapbox-ios-sdk-dynamic.json" ~> 6.0 -binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.json" ~> 14.1.5 +binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.json" ~> 18.0.2 +binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon-ios.json" == 4.0.0 github "mapbox/mapbox-directions-swift" ~> 0.33 github "mapbox/turf-swift" ~> 0.5 github "mapbox/mapbox-events-ios" ~> 0.10 diff --git a/Cartfile.resolved b/Cartfile.resolved index d26414aabc..334a7cdf5f 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,6 @@ +binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon-ios.json" "4.0.0" binary "https://api.mapbox.com/downloads/v2/carthage/mobile-maps/mapbox-ios-sdk-dynamic.json" "6.0.0" -binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.json" "14.1.6" +binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.json" "18.0.2" binary "https://www.mapbox.com/ios-sdk/MapboxAccounts.json" "2.3.0" github "CedarBDD/Cedar" "v1.0" github "Quick/Nimble" "v8.1.1" diff --git a/Example/Base.lproj/Localizable.strings b/Example/Base.lproj/Localizable.strings index cfd09c16a6..524862d87c 100644 --- a/Example/Base.lproj/Localizable.strings +++ b/Example/Base.lproj/Localizable.strings @@ -43,8 +43,8 @@ /* Title of sheet confirming waypoint removal */ "REMOVE_WAYPOINT_CONFIRM_TITLE" = "Remove Waypoint?"; -/* Alert message when a router has been configured; 1 = number of map tiles */ -"ROUTER_CONFIGURED_MSG" = "Router configured with %ld tile(s)."; +/* Alert message when a router has been configured */ +"ROUTER_CONFIGURED_MSG" = "Router configured."; /* Title of table view item that downloads a new offline region */ "SETTINGS_ITEM_DOWNLOAD_REGION_TITLE" = "Download Region"; diff --git a/Example/SettingsViewController.swift b/Example/SettingsViewController.swift index 78e91918ae..eab5bca6e0 100644 --- a/Example/SettingsViewController.swift +++ b/Example/SettingsViewController.swift @@ -96,7 +96,7 @@ class SettingsViewController: UITableViewController { let tilesURL = Bundle.mapboxCoreNavigation.suggestedTileURL(version: selectedOfflineVersion) Settings.directions.configureRouter(tilesURL: tilesURL!) { [weak self] (numberOfTiles) in - let message = String.localizedStringWithFormat(NSLocalizedString("ROUTER_CONFIGURED_MSG", value: "Router configured with %ld tile(s).", comment: "Alert message when a router has been configured; 1 = number of map tiles"), numberOfTiles) + let message = NSLocalizedString("ROUTER_CONFIGURED_MSG", value: "Router configured.", comment: "Alert message when a router has been configured") self?.presentAlert(message: message) } } diff --git a/Example/en.lproj/Localizable.stringsdict b/Example/en.lproj/Localizable.stringsdict index 7e27013815..0c67376eba 100644 --- a/Example/en.lproj/Localizable.stringsdict +++ b/Example/en.lproj/Localizable.stringsdict @@ -1,22 +1,5 @@ - - ROUTER_CONFIGURED_MSG - - NSStringLocalizedFormatKey - %#@tiles@ - tiles - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - ld - one - Router configured with %ld tile. - other - Router configured with %ld tiles. - - - + diff --git a/Example/yo.lproj/Localizable.stringsdict b/Example/yo.lproj/Localizable.stringsdict deleted file mode 100644 index 7e27013815..0000000000 --- a/Example/yo.lproj/Localizable.stringsdict +++ /dev/null @@ -1,22 +0,0 @@ - - - - - ROUTER_CONFIGURED_MSG - - NSStringLocalizedFormatKey - %#@tiles@ - tiles - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - ld - one - Router configured with %ld tile. - other - Router configured with %ld tiles. - - - - diff --git a/MapboxCoreNavigation.podspec b/MapboxCoreNavigation.podspec index e18df152d0..a907549c98 100644 --- a/MapboxCoreNavigation.podspec +++ b/MapboxCoreNavigation.podspec @@ -40,7 +40,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.module_name = "MapboxCoreNavigation" - s.dependency "MapboxNavigationNative", "~> 14.1.5" + s.dependency "MapboxNavigationNative", "~> 18.0.2" s.dependency "MapboxAccounts", "~> 2.3.0" s.dependency "MapboxDirections", "~> 0.33.0" s.dependency "MapboxMobileEvents", "~> 0.10.2" # Always pin to a patch release if pre-1.0 diff --git a/MapboxCoreNavigation/FixLocation.swift b/MapboxCoreNavigation/FixLocation.swift index 759d77fc0f..42aa65cdaa 100644 --- a/MapboxCoreNavigation/FixLocation.swift +++ b/MapboxCoreNavigation/FixLocation.swift @@ -10,6 +10,7 @@ extension FixLocation { } self.init(coordinate: location.coordinate, + monotonicTimestampNanoseconds: 0, // use time instead; see also `Navigator.status(at:)` time: location.timestamp, speed: location.speed >= 0 ? location.speed as NSNumber : nil, bearing: location.course >= 0 ? location.course as NSNumber : nil, diff --git a/MapboxCoreNavigation/Navigator.swift b/MapboxCoreNavigation/Navigator.swift new file mode 100644 index 0000000000..3470136077 --- /dev/null +++ b/MapboxCoreNavigation/Navigator.swift @@ -0,0 +1,9 @@ +import Foundation +import MapboxNavigationNative + +extension Navigator { + func status(at timestamp: Date) -> NavigationStatus { + // Because `FixLocation(_:)` passes in 0 as `monotonicTimestampNanoseconds`, we need to always call `getStatusForTimestamp(_:)` instead of `getStatusForMonotonicTimestampNanoseconds(_:)`. + return getStatusForTimestamp(timestamp) + } +} diff --git a/MapboxCoreNavigation/OfflineDirections.swift b/MapboxCoreNavigation/OfflineDirections.swift index a1b2bfab53..1ea213d95b 100644 --- a/MapboxCoreNavigation/OfflineDirections.swift +++ b/MapboxCoreNavigation/OfflineDirections.swift @@ -5,7 +5,7 @@ import MapboxNavigationNative /** A closure to call when the `NavigationDirections` router has been configured completely. */ -public typealias NavigationDirectionsCompletionHandler = (_ numberOfTiles: UInt64) -> Void +public typealias NavigationDirectionsCompletionHandler = (_ tilesURL: URL) -> Void /** An error that occurs when calculating directions potentially offline using the `NavigationDirections.calculate(_:offline:completionHandler:)` method. @@ -117,9 +117,9 @@ public class NavigationDirections: Directions { public func configureRouter(tilesURL: URL, completionHandler: @escaping NavigationDirectionsCompletionHandler) { NavigationDirectionsConstants.offlineSerialQueue.sync { let params = RouterParams(tilesPath: tilesURL.path, inMemoryTileCache: nil, mapMatchingSpatialCache: nil, threadsCount: nil, endpointConfig: nil) - let tileCount = self.navigator.configureRouter(for: params) + self.navigator.configureRouter(for: params) DispatchQueue.main.async { - completionHandler(tileCount) + completionHandler(tilesURL) } } } @@ -155,7 +155,7 @@ public class NavigationDirections: Directions { let navigator: Navigator = { let settingsProfile = SettingsProfile(application: ProfileApplication.kMobile, platform: ProfilePlatform.KIOS) - return Navigator(profile: settingsProfile, customConfig: "") + return Navigator(profile: settingsProfile, config: NavigatorConfig(), customConfig: "") }() let numberOfTiles = navigator.unpackTiles(forPackedTilesPath: tilePath, outputDirectory: outputPath) @@ -242,7 +242,7 @@ public class NavigationDirections: Directions { if _navigator == nil { let settingsProfile = SettingsProfile(application: ProfileApplication.kMobile, platform: ProfilePlatform.KIOS) - self._navigator = Navigator(profile: settingsProfile, customConfig: "") + self._navigator = Navigator(profile: settingsProfile, config: NavigatorConfig(), customConfig: "") } return _navigator diff --git a/MapboxCoreNavigation/RouteController.swift b/MapboxCoreNavigation/RouteController.swift index bfed533094..cf2d42916f 100644 --- a/MapboxCoreNavigation/RouteController.swift +++ b/MapboxCoreNavigation/RouteController.swift @@ -24,7 +24,7 @@ open class RouteController: NSObject { lazy var navigator: Navigator = { let settingsProfile = SettingsProfile(application: ProfileApplication.kMobile, platform: ProfilePlatform.KIOS) - return Navigator(profile: settingsProfile, customConfig: "") + return Navigator(profile: settingsProfile, config: NavigatorConfig(), customConfig: "") }() public var route: Route { @@ -64,15 +64,6 @@ open class RouteController: NSObject { var isFirstLocation: Bool = true - public var config: NavigatorConfig? { - get { - return navigator.getConfig() - } - set { - navigator.setConfigFor(newValue) - } - } - /** Details about the user’s progress along the current route, leg, and step. */ @@ -94,7 +85,7 @@ open class RouteController: NSObject { - important: If the rawLocation is outside of the route snapping tolerances, this value is nil. */ var snappedLocation: CLLocation? { - let status = navigator.getStatusForTimestamp(Date()) + let status = navigator.status(at: Date()) guard status.routeState == .tracking || status.routeState == .complete else { return nil } @@ -202,7 +193,7 @@ open class RouteController: NSObject { locations.forEach { navigator.updateLocation(for: FixLocation($0)) } - let status = navigator.getStatusForTimestamp(location.timestamp) + let status = navigator.status(at: location.timestamp) // Notify observers if the step’s remaining distance has changed. update(progress: routeProgress, with: CLLocation(status.location), rawLocation: location) @@ -351,11 +342,11 @@ open class RouteController: NSObject { a future timestamp compared to the last location received by the location manager. */ public func projectedLocation(for timestamp: Date) -> CLLocation { - return CLLocation(navigator.getStatusForTimestamp(timestamp).location) + return CLLocation(navigator.status(at:timestamp).location) } public func advanceLegIndex(location: CLLocation) { - let status = navigator.getStatusForTimestamp(location.timestamp) + let status = navigator.status(at: location.timestamp) routeProgress.legIndex = Int(status.legIndex) } @@ -390,7 +381,7 @@ extension RouteController: Router { return true } - let status = status ?? navigator.getStatusForTimestamp(location.timestamp) + let status = status ?? navigator.status(at: location.timestamp) let offRoute = status.routeState == .offRoute || status.routeState == .invalid return !offRoute } diff --git a/MapboxCoreNavigationTests/CLLocationTests.swift b/MapboxCoreNavigationTests/CLLocationTests.swift index 822ca2ff24..44c7540328 100644 --- a/MapboxCoreNavigationTests/CLLocationTests.swift +++ b/MapboxCoreNavigationTests/CLLocationTests.swift @@ -16,6 +16,7 @@ class CLLocationTests: XCTestCase { let bearingAccuracy: CLLocationAccuracy = 35 let fixLocation = FixLocation(coordinate: coordinate, + monotonicTimestampNanoseconds: 0, // use time instead; see also `Navigator.status(at:)` time: timestamp, speed: speed as NSNumber, bearing: bearing as NSNumber, diff --git a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj index e4e148e4db..4728d83896 100644 --- a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj +++ b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj @@ -128,6 +128,7 @@ buildConfigurationList = 352544F91E66623D004C8F1C /* Build configuration list for PBXNativeTarget "PodInstall" */; buildPhases = ( FCAEDB6CF8C116409B047EA1 /* [CP] Check Pods Manifest.lock */, + DBC6C5683D9BDC04331D7A2D /* [CP] Prepare Artifacts */, 352544D81E66623D004C8F1C /* Sources */, 352544D91E66623D004C8F1C /* Frameworks */, 352544DA1E66623D004C8F1C /* Resources */, @@ -231,6 +232,7 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-PodInstall/Pods-PodInstall-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt", "${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework", "${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM", "${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/C4CEBB96-98D0-316A-AACC-B5CFBF29F45A.bcsymbolmap", @@ -244,7 +246,7 @@ "${BUILT_PRODUCTS_DIR}/MapboxNavigation/MapboxNavigation.framework", "${PODS_ROOT}/MapboxNavigationNative/MapboxNavigationNative.framework", "${PODS_ROOT}/MapboxNavigationNative/MapboxNavigationNative.framework.dSYM", - "${PODS_ROOT}/MapboxNavigationNative/3B99A79B-2E8B-34B5-ABAA-D85AB8D5565D.bcsymbolmap", + "${PODS_ROOT}/MapboxNavigationNative/A67EB591-798A-3BA5-9F94-23F239B2B5A8.bcsymbolmap", "${BUILT_PRODUCTS_DIR}/MapboxSpeech/MapboxSpeech.framework", "${BUILT_PRODUCTS_DIR}/Polyline/Polyline.framework", "${BUILT_PRODUCTS_DIR}/Solar/Solar.framework", @@ -265,7 +267,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxNavigation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxNavigationNative.framework", "${DWARF_DSYM_FOLDER_PATH}/MapboxNavigationNative.framework.dSYM", - "${BUILT_PRODUCTS_DIR}/3B99A79B-2E8B-34B5-ABAA-D85AB8D5565D.bcsymbolmap", + "${BUILT_PRODUCTS_DIR}/A67EB591-798A-3BA5-9F94-23F239B2B5A8.bcsymbolmap", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxSpeech.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Polyline.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Solar.framework", @@ -276,6 +278,24 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PodInstall/Pods-PodInstall-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + DBC6C5683D9BDC04331D7A2D /* [CP] Prepare Artifacts */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-PodInstall/Pods-PodInstall-artifacts.sh", + "${PODS_ROOT}/MapboxCommon/MapboxCommon.xcframework", + ); + name = "[CP] Prepare Artifacts"; + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PodInstall/Pods-PodInstall-artifacts.sh\"\n"; + showEnvVarsInLog = 0; + }; FCAEDB6CF8C116409B047EA1 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock index 5520f8273d..e73912a30c 100644 --- a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock +++ b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock @@ -2,11 +2,12 @@ PODS: - Mapbox-iOS-SDK (6.0.0): - MapboxMobileEvents (= 0.10.2) - MapboxAccounts (2.3.0) + - MapboxCommon (4.0.0) - MapboxCoreNavigation (1.0.0-beta.1): - MapboxAccounts (~> 2.3.0) - MapboxDirections (~> 0.33.0) - MapboxMobileEvents (~> 0.10.2) - - MapboxNavigationNative (~> 14.1.5) + - MapboxNavigationNative (~> 18.0.2) - Turf (~> 0.5.0) - MapboxDirections (0.33.0): - Polyline (~> 4.2) @@ -18,7 +19,8 @@ PODS: - MapboxMobileEvents (~> 0.10.2) - MapboxSpeech (~> 0.3.0) - Solar (~> 2.1) - - MapboxNavigationNative (14.1.6) + - MapboxNavigationNative (18.0.2): + - MapboxCommon (= 4.0.0) - MapboxSpeech (0.3.0) - Polyline (4.2.1) - Solar (2.1.0) @@ -32,6 +34,7 @@ SPEC REPOS: trunk: - Mapbox-iOS-SDK - MapboxAccounts + - MapboxCommon - MapboxDirections - MapboxMobileEvents - MapboxNavigationNative @@ -49,11 +52,12 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Mapbox-iOS-SDK: 48ff7550bd459b8494da8ef4d660a668e9187ef0 MapboxAccounts: 84abfdde95d9dc483f604c1b0fe1861edf691ce7 - MapboxCoreNavigation: f6ee6f4093a5fd02619bd9d3fc35b1e8cefe61b2 + MapboxCommon: dd235a3715fa752aee83bb3be1d4ce0ba93e3b68 + MapboxCoreNavigation: 59410745f7c047f00b38b5a060678ec97ef8b493 MapboxDirections: dd01b8f9053719e02d87538b68355d3206321c81 MapboxMobileEvents: 2bc0ca2eedb627b73cf403258dce2b2fa98074a6 MapboxNavigation: e031095fa956e6a4af90e57577392709e3826da0 - MapboxNavigationNative: 05d47617f3d18c5e45d9b549cb82dc39cdb67693 + MapboxNavigationNative: 2d599b1f5bceb5e353cca64b49b3b6d4f389491b MapboxSpeech: 403415e932e084cf290b9d55c49ab7ea210b9595 Polyline: 0e9890790292741c8186201a536b6bb6a78d02dd Solar: 2dc6e7cc39186cb0c8228fa08df76fb50c7d8f24 diff --git a/MapboxCoreNavigationTests/NavigationServiceTests.swift b/MapboxCoreNavigationTests/NavigationServiceTests.swift index 57e997d990..3120644ff8 100644 --- a/MapboxCoreNavigationTests/NavigationServiceTests.swift +++ b/MapboxCoreNavigationTests/NavigationServiceTests.swift @@ -9,7 +9,7 @@ import os.log fileprivate let mbTestHeading: CLLocationDirection = 50 // minimum distance threshold between two locations (in meters) -fileprivate let distanceThreshold: CLLocationDistance = 1 +fileprivate let distanceThreshold: CLLocationDistance = 2 // minimum threshold for both latitude and longitude between two coordinates fileprivate let coordinateThreshold: CLLocationDistance = 0.0005 @@ -208,7 +208,7 @@ class NavigationServiceTests: XCTestCase { altitude: 0, horizontalAccuracy: 30, verticalAccuracy: 10, - course: -finalHeading, + course: (finalHeading + 180).truncatingRemainder(dividingBy: 360), speed: 5, timestamp: Date() + 5) diff --git a/MapboxCoreNavigationTests/OfflineRoutingTests.swift b/MapboxCoreNavigationTests/OfflineRoutingTests.swift index e6c1399740..1e6a02fbf9 100644 --- a/MapboxCoreNavigationTests/OfflineRoutingTests.swift +++ b/MapboxCoreNavigationTests/OfflineRoutingTests.swift @@ -12,9 +12,8 @@ class OfflineRoutingTests: XCTestCase { let directions = NavigationDirections(credentials: Fixture.credentials) - directions.configureRouter(tilesURL: tilesURL) { (numberOfTiles) in - // TODO: Revise this check. As of navigation native 14.1.4 numberOfTiles is always equal to 0. - XCTAssertEqual(numberOfTiles, 0) + directions.configureRouter(tilesURL: tilesURL) { (outTilesURL) in + XCTAssertEqual(tilesURL, outTilesURL) setupExpectation.fulfill() } @@ -58,9 +57,8 @@ class OfflineRoutingTests: XCTestCase { let setupExpectation = expectation(description: "Set up offline routing") let directions = NavigationDirections(credentials: Fixture.credentials) - directions.configureRouter(tilesURL: tilesURL) { (numberOfTiles) in - // TODO: Revise this check. As of navigation native 14.1.4 numberOfTiles is always equal to 0. - XCTAssertEqual(numberOfTiles, 0) + directions.configureRouter(tilesURL: tilesURL) { (outTilesURL) in + XCTAssertEqual(tilesURL, outTilesURL) setupExpectation.fulfill() } @@ -122,9 +120,8 @@ class OfflineRoutingTests: XCTestCase { let configureExpectation = self.expectation(description: "Configure router with unpacked tar") let directions = NavigationDirections(credentials: Fixture.credentials) - directions.configureRouter(tilesURL: outputDirectoryURL) { (numberOfTiles) in - // TODO: Revise this check. As of navigation native 14.1.4 numberOfTiles is always equal to 0. - XCTAssertEqual(numberOfTiles, 0) + directions.configureRouter(tilesURL: outputDirectoryURL) { (outOutputDirectoryURL) in + XCTAssertEqual(outputDirectoryURL, outOutputDirectoryURL) configureExpectation.fulfill() } diff --git a/MapboxNavigation-Documentation.podspec b/MapboxNavigation-Documentation.podspec index 7ae83aa314..d69d60908e 100644 --- a/MapboxNavigation-Documentation.podspec +++ b/MapboxNavigation-Documentation.podspec @@ -50,7 +50,7 @@ Pod::Spec.new do |s| s.dependency "MapboxGeocoder.swift", "~> 0.10.0" s.dependency "Mapbox-iOS-SDK", "~> 6.0" s.dependency "MapboxMobileEvents", "~> 0.10.2" - s.dependency "MapboxNavigationNative", "= 9.0.4" + s.dependency "MapboxNavigationNative", "~> 18.0.2" s.dependency "Solar", "~> 2.1" s.dependency "Turf", "~> 0.5.0" s.dependency "MapboxSpeech", "~> 0.3.0" diff --git a/MapboxNavigation.xcodeproj/project.pbxproj b/MapboxNavigation.xcodeproj/project.pbxproj index 634abe2077..967aee93b9 100644 --- a/MapboxNavigation.xcodeproj/project.pbxproj +++ b/MapboxNavigation.xcodeproj/project.pbxproj @@ -25,6 +25,8 @@ 16E3625C201265D600DF0592 /* ImageDownloadOperationSpy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16E3625B201265D600DF0592 /* ImageDownloadOperationSpy.swift */; }; 16EF6C1E21193A9600AA580B /* CarPlayManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16EF6C1D21193A9600AA580B /* CarPlayManagerTests.swift */; }; 16EF6C22211BA4B300AA580B /* CarPlayMapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16EF6C21211BA4B300AA580B /* CarPlayMapViewController.swift */; }; + 2B07444124B4832400615E87 /* TokenTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B07444024B4832400615E87 /* TokenTestViewController.swift */; }; + 2B2B1EEE2424E55800FA18A6 /* SKUIDTestable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2B1EED2424E55800FA18A6 /* SKUIDTestable.swift */; }; 2B5407EB24470B0A006C820B /* AVAudioSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B5407EA24470B0A006C820B /* AVAudioSession.swift */; }; 2B72EC5E241276D10003B370 /* RouteVoiceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B72EC5D241276D10003B370 /* RouteVoiceController.swift */; }; 2B72EC602412AA800003B370 /* SystemSpeechSynthesizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B72EC5F2412AA800003B370 /* SystemSpeechSynthesizer.swift */; }; @@ -34,9 +36,6 @@ 2B91C9B12416357700E532A5 /* MapboxSpeechSynthesizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B91C9B02416357700E532A5 /* MapboxSpeechSynthesizer.swift */; }; 1F25A90F24A52C1600737F01 /* URLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F25A90E24A52C1600737F01 /* URLSession.swift */; }; 1FFDFD92249C1AA80091746A /* JunctionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FFDFD91249C1AA70091746A /* JunctionView.swift */; }; - 2B2B1EE02424B95600FA18A6 /* ExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2B1EDF2424B95600FA18A6 /* ExampleUITests.swift */; }; - 2B07444124B4832400615E87 /* TokenTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B07444024B4832400615E87 /* TokenTestViewController.swift */; }; - 2B2B1EEE2424E55800FA18A6 /* SKUIDTestable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2B1EED2424E55800FA18A6 /* SKUIDTestable.swift */; }; 35002D611E5F6ADB0090E733 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 35002D5F1E5F6ADB0090E733 /* Assets.xcassets */; }; 35002D691E5F6B2F0090E733 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 35002D661E5F6B1B0090E733 /* Main.storyboard */; }; 3502231A205BC94E00E1449A /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35022319205BC94E00E1449A /* Constants.swift */; }; @@ -372,6 +371,13 @@ C5FFAC1520D96F5C009E7F98 /* CarPlayNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5FFAC1420D96F5B009E7F98 /* CarPlayNavigationViewController.swift */; }; CFD47D9020FD85EC00BC1E49 /* MGLAccountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFD47D8F20FD85EC00BC1E49 /* MGLAccountManager.swift */; }; DA0557252155040700A1F2AA /* RouteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0557242155040700A1F2AA /* RouteTests.swift */; }; + DA0A4B7824D0BC7000D6B4F8 /* MapboxCommon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */; }; + DA0A4B7924D0BC7000D6B4F8 /* MapboxCommon.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DA0A4B7C24D0BF6500D6B4F8 /* MapboxCommon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */; }; + DA0A4B7D24D0BF6500D6B4F8 /* MapboxCommon.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DA0A4B7E24D0BF6A00D6B4F8 /* MapboxCommon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */; }; + DA0A4B7F24D0BF6A00D6B4F8 /* MapboxCommon.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + DA0A4B8124D1C9B200D6B4F8 /* Navigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0A4B8024D1C9B200D6B4F8 /* Navigator.swift */; }; DA1755F82357B6BD00B06C1D /* StringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5A60EC820A2417200C21178 /* StringTests.swift */; }; DA1755F92357B7A100B06C1D /* md5_crazy_strings.txt in Resources */ = {isa = PBXBuildFile; fileRef = C5A60ECA20A241B600C21178 /* md5_crazy_strings.txt */; }; DA23C9611F4FC05C00BA9522 /* MGLMapView+MGLNavigationAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D825F91E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -555,6 +561,7 @@ C549F8331F17F2C5001A0A2D /* MapboxMobileEvents.framework in Embed Frameworks */, 35CC14181F79A434009E872A /* Turf.framework in Embed Frameworks */, 492B6F85213703EE0076D2C6 /* MapboxGeocoder.framework in Embed Frameworks */, + DA0A4B7924D0BC7000D6B4F8 /* MapboxCommon.framework in Embed Frameworks */, 3504DF7622B79B1D00D2FD3C /* MapboxAccounts.framework in Embed Frameworks */, 354A01D51E6626AC00D765C2 /* MapboxCoreNavigation.framework in Embed Frameworks */, C57607B21F4CC9E800C27423 /* Solar.framework in Embed Frameworks */, @@ -580,6 +587,7 @@ 35CDA87E2190F3AC0072B675 /* TestHelper.framework in Embed Frameworks */, 35CDA8502190EFDA0072B675 /* MapboxDirections.framework in Embed Frameworks */, 35CDA8522190EFDA0072B675 /* Mapbox.framework in Embed Frameworks */, + DA0A4B7D24D0BF6500D6B4F8 /* MapboxCommon.framework in Embed Frameworks */, 35CDA84C2190EFDA0072B675 /* MapboxMobileEvents.framework in Embed Frameworks */, 35CDA8482190EFDA0072B675 /* Turf.framework in Embed Frameworks */, 35CDA8582190F0670072B675 /* MapboxGeocoder.framework in Embed Frameworks */, @@ -598,6 +606,7 @@ C53F2EFA20EBC95600D9798F /* MapboxMobileEvents.framework in Embed Frameworks */, C53F2EFB20EBC95600D9798F /* Turf.framework in Embed Frameworks */, C53F2EFC20EBC95600D9798F /* MapboxCoreNavigation.framework in Embed Frameworks */, + DA0A4B7F24D0BF6A00D6B4F8 /* MapboxCommon.framework in Embed Frameworks */, DA3DA6D923E4D78E004B7B5B /* MapboxAccounts.framework in Embed Frameworks */, C53F2EFD20EBC95600D9798F /* Solar.framework in Embed Frameworks */, C53F2EFE20EBC95600D9798F /* MapboxDirections.framework in Embed Frameworks */, @@ -635,6 +644,8 @@ 16E3625B201265D600DF0592 /* ImageDownloadOperationSpy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageDownloadOperationSpy.swift; sourceTree = ""; }; 16EF6C1D21193A9600AA580B /* CarPlayManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarPlayManagerTests.swift; sourceTree = ""; }; 16EF6C21211BA4B300AA580B /* CarPlayMapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarPlayMapViewController.swift; sourceTree = ""; }; + 2B07444024B4832400615E87 /* TokenTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenTestViewController.swift; sourceTree = ""; }; + 2B2B1EED2424E55800FA18A6 /* SKUIDTestable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SKUIDTestable.swift; sourceTree = ""; }; 2B5407EA24470B0A006C820B /* AVAudioSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVAudioSession.swift; sourceTree = ""; }; 2B72EC5D241276D10003B370 /* RouteVoiceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteVoiceController.swift; sourceTree = ""; }; 2B72EC5F2412AA800003B370 /* SystemSpeechSynthesizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemSpeechSynthesizer.swift; sourceTree = ""; }; @@ -644,12 +655,6 @@ 2B91C9B02416357700E532A5 /* MapboxSpeechSynthesizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapboxSpeechSynthesizer.swift; sourceTree = ""; }; 1F25A90E24A52C1600737F01 /* URLSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSession.swift; sourceTree = ""; }; 1FFDFD91249C1AA70091746A /* JunctionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JunctionView.swift; sourceTree = ""; }; - 2B2B1EDD2424B95600FA18A6 /* ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 2B2B1EDF2424B95600FA18A6 /* ExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleUITests.swift; sourceTree = ""; }; - 2B2B1EE12424B95600FA18A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2B2B1EEA2424D0A700FA18A6 /* ViewController+UITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+UITests.swift"; sourceTree = ""; }; - 2B07444024B4832400615E87 /* TokenTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenTestViewController.swift; sourceTree = ""; }; - 2B2B1EED2424E55800FA18A6 /* SKUIDTestable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SKUIDTestable.swift; sourceTree = ""; }; 35002D5D1E5F6ABB0090E733 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35002D5F1E5F6ADB0090E733 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 35002D671E5F6B1B0090E733 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -972,6 +977,8 @@ CFD47D8F20FD85EC00BC1E49 /* MGLAccountManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MGLAccountManager.swift; sourceTree = ""; }; DA0557202154EF4700A1F2AA /* Route.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Route.swift; sourceTree = ""; }; DA0557242155040700A1F2AA /* RouteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteTests.swift; sourceTree = ""; }; + DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapboxCommon.framework; path = Carthage/Build/iOS/MapboxCommon.framework; sourceTree = ""; }; + DA0A4B8024D1C9B200D6B4F8 /* Navigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Navigator.swift; sourceTree = ""; }; DA1811FE20128B0900C91918 /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Navigation.strings; sourceTree = ""; }; DA18120120128B7B00C91918 /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = ""; }; DA18120320128E9400C91918 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; @@ -1095,6 +1102,7 @@ 354A01CF1E66266100D765C2 /* MapboxDirections.framework in Frameworks */, C57607B11F4CC9E800C27423 /* Solar.framework in Frameworks */, C549F8321F17F2C5001A0A2D /* MapboxMobileEvents.framework in Frameworks */, + DA0A4B7824D0BC7000D6B4F8 /* MapboxCommon.framework in Frameworks */, 35CC14171F79A434009E872A /* Turf.framework in Frameworks */, 354A01C91E66265B00D765C2 /* Polyline.framework in Frameworks */, 492B6F84213703D10076D2C6 /* MapboxGeocoder.framework in Frameworks */, @@ -1132,6 +1140,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DA0A4B7C24D0BF6500D6B4F8 /* MapboxCommon.framework in Frameworks */, 35CDA87C2190F3990072B675 /* TestHelper.framework in Frameworks */, 35CDA8572190F0670072B675 /* MapboxGeocoder.framework in Frameworks */, 35CDA84F2190EFDA0072B675 /* MapboxDirections.framework in Frameworks */, @@ -1172,6 +1181,7 @@ 1622E882215D776C006A2E5F /* MapboxNavigationNative.framework in Frameworks */, C53F2EEC20EBC95600D9798F /* Solar.framework in Frameworks */, C53F2EED20EBC95600D9798F /* MapboxMobileEvents.framework in Frameworks */, + DA0A4B7E24D0BF6A00D6B4F8 /* MapboxCommon.framework in Frameworks */, C53F2EEE20EBC95600D9798F /* Turf.framework in Frameworks */, 3507F9FB2134309E0086B39E /* MapboxGeocoder.framework in Frameworks */, C53F2EEF20EBC95600D9798F /* Polyline.framework in Frameworks */, @@ -1550,6 +1560,7 @@ 8D424F26215ECA5D00432491 /* CoreLocation.framework */, 1603C890214351EE00167D95 /* Cedar.framework */, 35C98734212E042C00808B82 /* MapboxNavigationNative.framework */, + DA0A4B7724D0BC7000D6B4F8 /* MapboxCommon.framework */, 3507F9F92134305C0086B39E /* MapboxGeocoder.framework */, 35B1AEBA20AD9AEC00C8544E /* Nimble.framework */, 35B1AEB920AD9AE600C8544E /* Quick.framework */, @@ -1666,6 +1677,7 @@ C51DF8651F38C31C006C6A15 /* Locale.swift */, 35F3387B2232AEBF0071DB5C /* MinimumEditDistance.swift */, C578DA071EFD0FFF0052079F /* ProcessInfo.swift */, + DA0A4B8024D1C9B200D6B4F8 /* Navigator.swift */, 35A43F76223BD632000CB367 /* RouteLeg.swift */, 35A5413A1EFC052700E49846 /* RouteOptions.swift */, 35C98732212E037900808B82 /* RouteState.swift */, @@ -2638,6 +2650,7 @@ 359574A81F28CC5A00838209 /* CLLocation.swift in Sources */, 8DCE1050210FC5880048B0FB /* EndOfRouteFeedback.swift in Sources */, 35C98731212E02B500808B82 /* RouteController.swift in Sources */, + DA0A4B8124D1C9B200D6B4F8 /* Navigator.swift in Sources */, 351927361F0FA072003A702D /* ScreenCapture.swift in Sources */, 35F3387C2232AEBF0071DB5C /* MinimumEditDistance.swift in Sources */, C5D9800F1EFBCDAD006DBF2E /* Date.swift in Sources */, diff --git a/README.md b/README.md index 2cbab30357..ab8411288e 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Alternatively, to install Mapbox Navigation using [Carthage](https://github.com/ github "mapbox/mapbox-navigation-ios" ~> 0.40 ``` -1. Follow the rest of [Carthage’s iOS integration instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos). Your application target’s Embedded Frameworks should include `MapboxNavigation.framework`, `MapboxCoreNavigation.framework`, `MapboxNavigationNative.framework`, and `MapboxAccounts.framework`. +1. Follow the rest of [Carthage’s iOS integration instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos). Your application target’s Embed Frameworks build phase should include `MapboxNavigation.framework`, `MapboxCoreNavigation.framework`, `MapboxNavigationNative.framework`, and `MapboxAccounts.framework`. ## Installing the latest prerelease @@ -88,7 +88,7 @@ Alternatively, to install Mapbox Navigation using [Carthage](https://github.com/ 1. _(Optional)_ Clear your Carthage caches: ```bash - rm -rf ~/Library/Caches/carthage/ ~/Library/Caches/org.carthage.CarthageKit/binaries/{MapboxAccounts,MapboxNavigationNative,mapbox-ios-sdk-dynamic} + rm -rf ~/Library/Caches/carthage/ ~/Library/Caches/org.carthage.CarthageKit/binaries/{MapboxAccounts,MapboxCommon-ios,MapboxNavigationNative,mapbox-ios-sdk-dynamic} ``` 1. Create a [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#github-repositories) with the following dependency: @@ -98,7 +98,7 @@ Alternatively, to install Mapbox Navigation using [Carthage](https://github.com/ 1. Run `carthage update --platform iOS --use-netrc` to build just the iOS dependencies. -1. Follow the rest of [Carthage’s iOS integration instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos). Your application target’s Embedded Frameworks should include `MapboxNavigation.framework`, `MapboxCoreNavigation.framework`, `MapboxNavigationNative.framework`, and `MapboxAccounts.framework`. +1. Follow the rest of [Carthage’s iOS integration instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos). Your application target’s Embed Frameworks build phase should include `MapboxNavigation.framework`, `MapboxCoreNavigation.framework`, `MapboxNavigationNative.framework`, `MapboxCommon.framework`, and `MapboxAccounts.framework`. ## Configuration