MapUpdateVersionCommitPolicy
public enum MapUpdateVersionCommitPolicy : UInt32, CaseIterable, Codable
Defines if installed regions and subregions are updated one-by-one or if all regions are
updated only once the updates for all installed regions have been downloaded entirely.
This influences the required size of the storage during an update.
Regardless of the set policy, during an update, the previous region data is kept
until the new region data is committed successfully to the persisted storage.
This allows to revert to the previous version in case the update fails.
With MapUpdater.MapUpdateVersionCommitPolicy.onComplete, more data has to be kept until
the update process finishes, while MapUpdater.MapUpdateVersionCommitPolicy.onFirstRegion
allows to make faster use of the downloaded region and requires less disk space as only the
currently updated region is kept until the process completes.
However, with an MapUpdater.MapUpdateVersionCommitPolicy.onFirstRegion policy the overall
process can be less reliable and bears a higher risk of errors.
-
Updates the cache and the persisted storage once the first region was fully downloaded. If only one region was requested, this setting is equivalent to
MapUpdater.MapUpdateVersionCommitPolicy.onComplete. If more regions or subregions are requested, then the policy will apply. For example, if Germany is requested to be updated, then the cache and the persisted storage will be updated as soon as any contained subregion such as Berlin or Brandenburg has been fully downloaded. The previous data for a region will be removed once that specific region has been updated successfully. However, theMapVersionHandlewill be updated once the first region has been installed. This inconsistency will be gone, once the update process completes. In case of errors, or an aborted update process,CatalogsUpdateInfoCallbackindicates that still an update is available until the process was successfully repeated.Declaration
Swift
case onFirstRegion -
Commits the new map version to the cache and the persisted storage once all previously installed regions have been updated. For example, if Germany needs an update, then all previous data is kept until Germany including all subregions has been downloaded. This update process is more reliable than
MapUpdater.MapUpdateVersionCommitPolicy.onFirstRegion, but requires more free storage space until the process completes. Besides, users need to wait longer until they can use all updated regions.Declaration
Swift
case onComplete