Upgrading to 2.2.0
Contents
Most apps should upgrade TrimbleMapsNavigation and TrimbleMapsCoreNavigation to 2.2.0, TrimbleMapsWebservicesClient to 2.2.0, plugin binaries (for example RoutePlugin) to 2.2.0, and Turf to 1.1.0 as one set. Remove Polyline and Solar from your app if you linked them only for the SDK.
If you use decoded Route and RouteStep shapes from directions and do not customize routing request/response handling, you do not need routing API changes.
Documentation examples may still show TrimbleMaps 2.1.1 and TrimbleMapsAccounts 2.1.2 for the core map binary until a future maps release updates those pins.
Dependencies (all integrators)
- Remove Polyline (
raphaelmor/Polyline) from your Cartfile or CocoaPods configuration and from copy-frameworks or embed steps in Xcode. - Remove Solar (
ceeK/Solar) if navigation was the only reason it was present. TrimbleMapsNavigation 2.2.0 no longer requires it. - Keep Turf 1.1.0 in your link and embed list. You may already receive it transitively; it is still required at runtime.
- Align TrimbleMapsWebservicesClient 2.2.0, plugin binaries 2.2.0, and navigation 2.2.0 binaries. Do not mix them with older 2.1.x webservices, plugin, or navigation builds.
App code that changes
Polyline encoding and decoding
If you encoded or decoded polylines yourself (often via the Polyline package), use Turf 1.1.0 instead:
import Turf
let line = LineString([/* coordinates */])
let encoded = line.encodedPolyline(precision: EncodedPolylinePrecision.polyline6)
let decoded = try LineString(
encodedPolyline: encoded,
precision: EncodedPolylinePrecision.polyline6
)
Use EncodedPolylinePrecision when you need polyline5 versus polyline6 precision.
Unchanged for typical directions usage:
- Fetch directions and use
Route.shapeas aLineString. - Default request geometry remains polyline6.
Navigation day and night styling
Automatic navigation styling follows the system light or dark appearance, not sunrise and sunset at a location.
StyleManagerDelegate.location(for:) no longer drives day and night map styles.
If you need cab-style “always night” while the device uses light mode, disable automatic time-of-day styling and set the style yourself, or implement userInterfaceStyle(for:) on StyleManagerDelegate.
Swift Places (WebservicesClient 2.2.0)
When using Swift types from TrimbleMapsWebservicesClient 2.2.0, place geometry is Turf, not map-SDK wrapper types:
- Use
.coordinateon place geometry (not.point.coordinate). - Convert Turf types to
TMGL*types only where you draw on the map.
The Objective-C webservices wrapper path is unchanged.
Deployment target
Match the SDK minimum for the 2.2.0 line: iOS 15 or later. Raise your app deployment target if it is lower.
No consumer change
You do not need changes for the following:
- Standard directions and turn-by-turn navigation (options, shapes on
Routeand steps, map route line drawn by the SDK). - Plugins used only as shipped UI, with no custom polyline or Places geometry code.
- Objective-C-only Places via the webservices Objective-C wrapper.