CatalogVersionHint
public class CatalogVersionHint
extension CatalogVersionHint: NativeBase
extension CatalogVersionHint: Hashable
This is a class for capturing user’s intent for the
desired catalog version to use in DesiredCatalog class.
You can request a specific or latest version of a catalog by calling the
static functions CatalogVersionHint.specific(...) and
CatalogVersionHint.latest(...) respectively. The HERE platform will make the
best effort to provide an appropriate version for the catalog based on this
version hint.
Please take note that for the API CatalogVersionHint.specific(...) to function properly,
it is essential that the mutable and persistent storage should be cleaned.
-
This static method is used when you are interested in a specific version of a catalog, that you want to specify manually. To ensure proper functioning of this API, it is essential to clean the mutable and persistent storage.
Declaration
Swift
public static func specific(version: Int64) -> CatalogVersionHintParameters
versionAn integer value indicating the version of catalog desired. If the desired version does not exist, the HERE platform will make the best effort to provide an appropriate version or result in error logs about invalid version.
Return Value
Instance of
CatalogVersionHintwith specified version. -
This static method can be called when you are interested in getting the most latest version of a catalog when initializing the HERE SDK with
SDKOptionswhere you can specify the catalog(s) you want to use. In effect, this will auto-update the cached map data on each start, if possible. Use this only when you have no installedRegions. Since this affects only the map data cache, calling this at initialization time has no or only a very limited effect on the start-up time.In order to auto-update cached OCM-based map data, such as for the HERE SDK (Navigate), use the default HRN value: “hrn:here:data::olp-here:ocm” in your
DesiredCatalog. Note that the HERE SDK (Explore) cannot be used with such settings and the initialization of the HERE SDK may fail - since it is based on a different map format.Declaration
Swift
public static func latest(ignoreCachedData: Bool) -> CatalogVersionHintParameters
ignoreCachedDataA flag to specify handling of any cached data present on a device when trying to update the map version. If set to true, the HERE SDK will auto-update to the latest catalog version when no installed
Regionsare present. If present, this call will have no effect - useupdateCatalog()viaMapUpdaterinstead to update all map data to the latest version. Note that cached data present on a device - for example, data in the map cache or data cached byPrefetchAroundLocationWithRadiusorPrefetchAroundRouteOnIntervals- will be become obsolete if a newer map version is available. Such data will be evicted using a LRU strategy over time. If set to false, the HERE SDK will auto-update to use the latest version, only when there is no cached map data at all (for example, at first install or after clearing the cache) and no installed map data. Otherwise, this call will have no effect.Return Value
Instance of
CatalogVersionHint.