Skip to content

Releases: mapbox/mapbox-directions-swift

v0.10.3

11 Sep 19:50
Compare
Choose a tag to compare

Changes since v0.10.2:

  • Added a RouteShapeFormat.polyline6 option for enhanced route line precision. (#167)
  • Added a RouteOptions.includeExitRoundaboutManeuver option to get separate steps for entering and exiting each roundabout. (#168, #169)

Documentation is available online or within Xcode.

v0.10.2

07 Sep 18:32
Compare
Choose a tag to compare

Changes since v0.10.1:

  • Added a Route.routeIdentifer property that contains the unique identifier associated with the network request that created the route. (#165)

Documentation is available online or within Xcode.

v0.10.1

20 Jul 22:39
Compare
Choose a tag to compare

Changes since v0.10.0:

  • While the debugger is paused, you can visually inspect Route, RouteLeg, RouteStep, and Waypoint objects using Xcode’s built-in Quick Look feature. (#152)
  • Fixed an issue causing an exit with multiple exit numbers to correspond to only a single item in the RouteStep.exitCodes property. (#149)
  • Added an Intersection.outletRoadClasses property that provides details about the road leading away from the intersection. (#154, #157)
  • Added properties to Route that indicate the access token and API endpoint of the Directions object that created the route. (#155)

v0.10.0

07 Jul 19:42
Compare
Choose a tag to compare

Changes since v0.9.1:

  • Added an AttributeOptions option, congestion, for obtaining the level of traffic congestion along each segment of a RouteLeg. (#123)
  • Added a RouteStep.exitCodes property that contains the exit number of a takeOffRamp maneuver. (#147)
  • Renamed Directions.urlForCalculating(_:) to url(forCalculating:) to adhere to Swift 3 naming conventions. (#138)
  • If any of the waypoints ofRouteOptions is named, those names persist in the RouteLegs’ waypoints.
  • Fixed an issue causing RouteSteps to fail to decode if the maneuverDirection was omitted or unrecognized. (#137)
  • Changed the raw values of the AttributeOptions options. (#123)

Documentation is available online or within Xcode.

v0.9.1

30 May 23:52
Compare
Choose a tag to compare

Changes since v0.9.0:

  • RouteOptions now conforms to NSSecureCoding. (#129)
  • Multiple AttributeOptions values can be specified simultaneously in one RouteOptions object. (#129)

v0.9.0

13 Apr 22:55
Compare
Choose a tag to compare

Changes since v0.8.1:

  • Added an option to RouteOptions for obtaining attributes about each node or segment between nodes in the returned route legs. Available attributes include expected speed and travel time. (#118)
  • Replaced Route’s profileIdentifier property with a routeOptions property set to the RouteOptions object that was used to obtain the route. (#122)

v0.8.1

30 Mar 20:24
Compare
Choose a tag to compare

Changes since v0.8.0:

v0.8.0

22 Feb 16:49
Compare
Choose a tag to compare

Changes since v0.7.0:

  • Migrated to Swift 3.0. If your application is written in Swift 2.3, you should stick to v0.7.x or use the swift2.3 branch. (#57)
  • Fixed an issue causing the error “The sandbox is not in sync with the Podfile.lock” when updating a Carthage-based project that requires this framework. (#102)
  • Replaced the profile identifier constants with the MBDirectionsProfileIdentifier extensible string enumeration, which is available to both Objective-C and Swift. (#106)

v0.7.0

20 Feb 01:06
Compare
Choose a tag to compare

This will be the final Swift 2.x release. Changes since v0.6.0:

  • Migrated to Swift 2.3.
  • Fixed an error that occurred when archiving an application that links to this library. (#108)
  • Added the profile identifier constant MBDirectionsProfileIdentifierAutomobileAvoidingTraffic for driving routes that avoid traffic congestion. (#86)
  • Replaced RouteStep’s name property with a names property; each string in the array is a road name that was previously delimited by a semicolon. (#91)
  • Added a codes property to RouteStep that contains any highway route numbers associated with the road. These are the same route numbers that were formerly parenthesized in the name property. (#91)
  • Added a destinations property to RouteStep that indicates a highway ramp’s signposted destination. (#63)
  • Added an intersections property to RouteStep that indicates the locations and configurations of each intersection along the step, including turn lane markings. (#80)
  • Added UseLane and TakeRotary maneuver types, which indicate an instruction to change lanes or enter a large, named roundabout, respectively. (#93)
  • Fixed a crash that could occur when the user is connected to a captive network. (#71)
  • Fixed a crash that occurred when a request failed due to rate limiting. (#103)
  • The Route, RouteLeg, and RouteStep classes now conform to the NSSecureCoding protocol. (#68)
  • Added convenience initializers to RouteLeg and RouteStep that accept a JSON dictionary formatted as the relevant part of a Mapbox Directions API response. (#92)
  • The user agent string sent by the Mac version of this library now says “macOS” instead of “OS X”. (#55)

v0.6.0

06 Jun 21:54
Compare
Choose a tag to compare

This is a complete rewrite of MapboxDirections.swift that focuses on making the API more Swift-like in Swift but also adds Objective-C support (#47). The goal is no longer to be a drop-in replacement for MapKit’s MKDirections API, but the library continues to use terminology familiar to Cocoa and Cocoa Touch developers. This version includes a number of breaking changes:

  • Most types and methods can now be used in Objective-C.
  • Removed the MB class prefix from Swift but kept it for Objective-C. If any type conflicts with a type in your application’s module, prefix it with MapboxDirections..
  • Added a shared (singleton) Directions object. Use the shared object if you’ve set your Mapbox access token in the MGLMapboxAccessToken key of your application’s Info.plist file. (You may have already done so if you’ve installed the Mapbox iOS SDK or Mapbox OS X SDK.) Otherwise, create a Directions object with the access token explicitly.
  • Simplified the networking part of the library:
    • Removed the dependency on RequestKit. If you’re upgrading to this version using CocoaPods, you can remove the NBNRequestKit dependency override.
    • Directions no longer needs to be strongly held in order for the request to finish. Instead, the request is made against the shared URL session; to use a custom URL session, make the request yourself using the URL returned by the URLForCalculatingDirections(options:) property.
    • A single directions object uses the shared URL session for all requests, so it can handle multiple requests concurrently without raising an exception.
    • Removed the cancel() method; instead, directly cancel the NSURLSessionDataTask returned by calculateDirections(options:completionHandler:).
  • Replaced calculateDirectionsWithCompletionHandler(_:completionHandler:) and calculateETAWithCompletionHandler(_:completionHandler:) with a single calculateDirections(options:completionHandler:) method, which takes a RouteOptions object that supports all the options exposed by the Geocoding API. If you need to use Mapbox Directions API v4, use a RouteOptionsV4 instead of RouteOptions.
  • Steps are no longer returned by default, and the overview geometry is simplified by default. If you want full, turn-by-turn directions, configure the RouteOptions object to include the route steps and full-resolution route shapes. If you only want the estimated travel time or distance to a destination, use the default values in RouteOptions.
  • Replaced the MBDirectionsRequest.TransportType type with a freeform profileIdentifier option. Use one of the three profile identifier constants with this option.
  • Removed the MBDirectionsResponse class in favor of passing the waypoints and routes from the response directly into the completion handler.
  • Renamed Route.geometry to Route.coordinates. For Objective-C compatibility, there are additional methods that work with C arrays of coordinates.
  • Each enumeration’s raw values are integer types instead of strings, but the enumerations also conform to CustomStringConvertible in Swift, allowing the enumeration values to be converted to and from strings easily.

Other changes since v0.5.0:

  • Added official support for OS X, tvOS, and watchOS. (#49)
  • Added documentation for the entire library. You can access the documentation for any symbol using Quick Help (option-click) or Jump to Definition (command-click). (#47)
  • Replaced the TakeRamp maneuver type with TakeOnRamp, TakeOffRamp, and TurnAtRoundabout to reflect changes in OSRM v5.1.0 and Mapbox Directions API v5. (#45)
  • Added options to configure what’s included in the output, how close the route needs to come to the specified waypoints, and whether to include routes that U-turn at intermediate waypoints. (#47)
  • Added a way to specify the heading accuracy of any waypoint. (#47)
  • By default, returned routes may U-turn at intermediate waypoints. (#47)
  • Various error conditions returned by the API, such as the rate limiting error, cause the localized failure reason and recovery suggestion to be set in the NSError object that is passed into the completion handler. (#47)
  • Requests sent through this library now use a more specific user agent string, so you can more easily identify this library on your Statistics page in Mapbox Studio. (#50)