Skip to content

Migration Guide 3.20

Migration SDK from Old Versions

This section provides a detailed description of API changes introduced or removed in recent SDK upgrades.
We strongly recommend reading this documentation when upgrading the SDK version to understand the differences and update your API calls accordingly.

Migration to Version 3.20.0

TNEnrollmentClient / EnrollmentClient now expose withConnectionMode so the next enrollment request (for example getRecommendedPeripherals) can target cloud vs on-device behavior on the current thread. getRecommendedPeripherals Combine/async flows use a facade that observes meaningful peripheral-field changes instead of merging on every peripheral collection pulse.

1
2
3
4
TNDriveMotionService.getEnrollmentClient()
    .withConnectionMode(mode: .cloud)
    .getRecommendedPeripheralsRequest()
    .build()
1
2
3
4
DriveMotionService.enrollmentClient
    .withConnectionMode(ConnectionMode.CLOUD)
    .getRecommendedPeripheralsRequest()
    .build()

Breaking / migration: PeripheralEvent, PeripheralItem, and PeripheralEventTrigger were removed from TelenavDriveMotionAPI (iOS) and the ACTION_MONITOR_PERIPHERAL_EVENT broadcast plus PeripheralEvent model were removed on Android—migrate UI/state off those types to getRecommendedPeripherals streams and monitor events that remain documented.

Migration to Version 3.20.3

Improved getRecommendedPeripherals in cloud mode with clearer LOCAL/CLOUD/MERGED sourcing and reliable fallback to local results when cloud setup cannot complete.

Added RecommendationSource / TNRecommendationSource (LOCAL, CLOUD, MERGED) on GetRecommendedPeripheralsResponse / TNGetRecommendedPeripheralsResponse as optional source. Cloud mode now falls back to a successful local response (instead of INVALID_REQUEST / throw) when channel client id is missing or cloud setup fails. When source is MERGED, use each peripheral's isCloudRecommended to see which rows came from cloud.

1
2
3
4
5
6
7
8
TNGetRecommendedPeripheralsCall().execute(request: request) { response, error in
    switch response?.source {
    case .local: break
    case .cloud: break
    case .merged: break // check peripheral.isCloudRecommended
    case .none: break   // legacy payloads
    }
}
1
response.source // RecommendationSource.LOCAL | CLOUD | MERGED (nullable for legacy)