Provides methods which facilitate usage of offline map data capabilities. Some calls made to SYMapLoader are asynchronous and return results through the SYMapLoaderDelegate protocol. More...
#import <SYMapInstaller.h>


Instance Methods | |
| ((unavailable("Use +[SYMapInstaller shared] instead.") | - __attribute__ |
| SYMapInstaller is singleton, use [SYMapInstaller shared] to access singleton instance. More... | |
| (nonnull SYTask *) | - getAvailableCountries:completion: |
| Fetches available maps matching the requested filter. When finished, it calls the callback with the list of available map ISO codes. More... | |
| (void) | - resumePendingInstallations: |
| Resumes all pending map installations (updates included). If the installation progress should be reported, use the "mapinstaller_register_on_progress_callback" function to register it. If the notification about finished installation is needed, use the "mapinstaller_register_on_resumed_install_done_callback" function to register it. More... | |
| (nonnull SYTask *) | - detectCurrentCountry:completion: |
| Detects the country of current location by IP address, or by ISO code of a region. More... | |
| (nonnull SYTask *) | - installMap:completion: |
| Downloads and installs the requested map. If the installation progress should be reported, use SYMapInstallerDelegate. More... | |
| (nonnull SYTask *) | - installMap:options:completion: |
| Downloads and installs the requested map. If the installation progress should be reported, use SYMapInstallerDelegate. More... | |
| (void) | - installMapBundleWithInfoBlock:partialInstallBlock:completion: |
| Installs maps from a local bundle. The bundle must be located in Application Data folder, relative path is "Library/sygic/offline_maps/update". More... | |
| (nonnull SYTask *) | - uninstallMap:completion: |
| Uninstalls the requested map. More... | |
| (void) | - getMapStatus:completion: |
| Fetches the status of requested map (country or region) asynchronously. More... | |
| (void) | - loadMap:completion: |
| Loads installed map (country or region) asynchronously. More... | |
| (void) | - unloadMap:completion: |
| Unloads loaded map asynchronously. More... | |
| (void) | - loadMaps:completion: |
| Loads an array of installed maps (country or region) asynchronously. More... | |
| (void) | - unloadMaps:completion: |
| Unloads an array of loaded maps asynchronously. More... | |
| (nonnull SYTask *) | - checkForUpdatesWithCompletion: |
| Checks for map updates. More... | |
| (nonnull SYTask *) | - updateMap:completion: |
| Updates map with given ISO code. If the update progress should be reported, use the "maploader_register_on_progress_callback" function to register it. In case of successful update, the map will be loaded. More... | |
| (nonnull SYTask *) | - updateMap:options:completion: |
| Updates map with given ISO code. If the update progress should be reported, use SYMapInstallerDelegate. In case of successful update, the map will be loaded. More... | |
| (void) | - getCountryDetails:installedOnly:completion: |
| Fetch details about a country asynchronously. More... | |
| (void) | - getRegionDetails:installedOnly:completion: |
| Fetch details about a country region asynchronously. More... | |
| (void) | - setLocale:completion: |
| Sets the locale of MapInstaller's data (the MapLists). Fetches localized MapList from the API and translates local data. Returns SYMapInstallerResultUnsupportedLocale if desired locale is not supported by the maps API. All MapInstaller calls, which return some localized data (getCountryDetails, getRegionDetails, ...), called afterwards, will return localized content (if the locale is supported). More... | |
| (void) | - clearCacheWithCompletion: |
| Clear the MapInstaller cache. Clearing the cache will fetch the most recent data (MapList) from the MapsAPI. More... | |
Class Methods | |
| (nullable SYMapInstaller *) | + shared |
| Returns the SYMapInstaller singleton instance (or nil if SygicMaps SDK is not initialized). More... | |
| ((unavailable("Use +[SYMapInstaller shared] instead.") | + __attribute__ |
Properties | |
| id< SYMapInstallerDelegate > | delegate |
| Current SYMapInstallerDelegate. More... | |
Provides methods which facilitate usage of offline map data capabilities. Some calls made to SYMapLoader are asynchronous and return results through the SYMapLoaderDelegate protocol.
| + (nullable SYMapInstaller*) shared |
Returns the SYMapInstaller singleton instance (or nil if SygicMaps SDK is not initialized).
| - ((unavailable("Use +[SYMapInstaller shared] instead.") __attribute__ |
SYMapInstaller is singleton, use [SYMapInstaller shared] to access singleton instance.
| + ((unavailable("Use +[SYMapInstaller shared] instead.") __attribute__ |
| - (nonnull SYTask*) getAvailableCountries: | (SYMapInstallerMapFilter) | filter | |
| completion: | (nonnull SYMapInstallerMapArrayCompletionBlock) | completion | |
Fetches available maps matching the requested filter. When finished, it calls the callback with the list of available map ISO codes.
| filter | SYMapInstallerMapFilterAll - includes already installed maps and maps available for download SYMapInstallerMapFilterInstalled - includes only already installed maps |
| completion | block used as a callback for this function |
| - (void) resumePendingInstallations: | (nonnull SYMapInstallerResumeInfoBlock) | infoCallback |
Resumes all pending map installations (updates included). If the installation progress should be reported, use the "mapinstaller_register_on_progress_callback" function to register it. If the notification about finished installation is needed, use the "mapinstaller_register_on_resumed_install_done_callback" function to register it.
| infoCallback | Block used as a callback for resume information. |
| - (nonnull SYTask*) detectCurrentCountry: | (nullable NSString *) | country | |
| completion: | (nonnull SYMapInstallerOneMapCompletionBlock) | completion | |
Detects the country of current location by IP address, or by ISO code of a region.
| country | should be nil for detection current country by IP address. If provided ISO code of a region, ISO code of the whole country will be returned. |
| completion | block is called after the detection process finishes, called with ISO code of the detected country. |
| - (nonnull SYTask*) installMap: | (nonnull SYCountryIso *) | map | |
| completion: | (nonnull SYMapInstallerOneMapCompletionBlock) | completion | |
Downloads and installs the requested map. If the installation progress should be reported, use SYMapInstallerDelegate.
| map | ISO code of map to be downloaded and installed. |
| completion | block is called after the installation finishes, called with ISO code and installation result |
| - (nonnull SYTask*) installMap: | (nonnull SYCountryIso *) | map | |
| options: | (nullable SYDownloadOptions *) | options | |
| completion: | (nonnull SYMapInstallerOneMapCompletionBlock) | completion | |
Downloads and installs the requested map. If the installation progress should be reported, use SYMapInstallerDelegate.
| map | ISO code of map to be downloaded and installed. |
| options | Network options, which are to be respected when downloading files during this operation. |
| completion | block is called after the installation finishes, called with ISO code and installation result |
| - (void) installMapBundleWithInfoBlock: | (nullable SYMapInstallerLocalInstallInfoBlock) | infoBlock | |
| partialInstallBlock: | (nullable SYMapInstallerLocalInstallPartialInstallBlock) | partialInstallBlock | |
| completion: | (nonnull SYMapInstallerLocalInstallCompletionBlock) | completion | |
Installs maps from a local bundle. The bundle must be located in Application Data folder, relative path is "Library/sygic/offline_maps/update".
| infoBlock | block is called before installation started, informs about maps which are planned for installation. |
| partialInstallBlock | block is called after each map installation completed. |
| completion | block is called after the whole operation finished. |
| - (nonnull SYTask*) uninstallMap: | (nonnull SYCountryIso *) | map | |
| completion: | (nonnull SYMapInstallerOneMapCompletionBlock) | completion | |
Uninstalls the requested map.
| map | ISO code of map to be uninstalled. |
| completion | block is called after the completion of the uninstall process. Called with map ISO code and uninstall result. |
| - (void) getMapStatus: | (nonnull SYCountryIso *) | map | |
| completion: | (nonnull SYMapInstallerMapStatusCompletionBlock) | completion | |
Fetches the status of requested map (country or region) asynchronously.
| map | ISO code of the map. |
| completion | block is called when the status is ready. Called with SYMapLoaderResult and SYMapLoaderMapStatus. |
| - (void) loadMap: | (nonnull SYCountryIso *) | map | |
| completion: | (nonnull SYMapInstallerResultCompletionBlock) | completion | |
Loads installed map (country or region) asynchronously.
| map | ISO code of the map to be loaded. |
| completion | block is called after the map is loaded. Called with SYMapInstallerResult. |
| - (void) unloadMap: | (nonnull SYCountryIso *) | map | |
| completion: | (nonnull SYMapInstallerResultCompletionBlock) | completion | |
Unloads loaded map asynchronously.
| map | ISO code of the map to be unloaded. |
| completion | block is called after the map is unloaded. Called with SYMapInstallerResult. |
| - (void) loadMaps: | (nonnull NSArray< SYCountryIso * > *) | maps | |
| completion: | (nonnull SYMapInstallerResultCompletionBlock) | completion | |
Loads an array of installed maps (country or region) asynchronously.
| maps | array of map ISO codes to be loaded. |
| completion | block is called after the maps are loaded. Called with SYMapLoaderResult. |
| - (void) unloadMaps: | (nonnull NSArray< SYCountryIso * > *) | maps | |
| completion: | (nonnull SYMapInstallerResultCompletionBlock) | completion | |
Unloads an array of loaded maps asynchronously.
| maps | array of map ISO codes to be unloaded. |
| completion | block is called after the maps are unloaded. Called with SYMapLoaderResult. |
| - (nonnull SYTask*) checkForUpdatesWithCompletion: | (nonnull SYMapInstallerMapArrayCompletionBlock) | completion |
Checks for map updates.
| completion | block is called with the check result and list of ISO codes, representing the maps for which an update is available. |
| - (nonnull SYTask*) updateMap: | (nonnull SYCountryIso *) | map | |
| completion: | (nonnull SYMapInstallerOneMapCompletionBlock) | completion | |
Updates map with given ISO code. If the update progress should be reported, use the "maploader_register_on_progress_callback" function to register it. In case of successful update, the map will be loaded.
| map | ISO code of map, for which an update should be performed. |
| completion | block is called after the update is complete, called with ISO code of the map and status. |
| - (nonnull SYTask*) updateMap: | (nonnull SYCountryIso *) | map | |
| options: | (nullable SYDownloadOptions *) | options | |
| completion: | (nonnull SYMapInstallerOneMapCompletionBlock) | completion | |
Updates map with given ISO code. If the update progress should be reported, use SYMapInstallerDelegate. In case of successful update, the map will be loaded.
| map | ISO code of map, for which an update should be performed. |
| options | Network options, which are to be respected when downloading files during this operation. |
| completion | block is called after the update is complete, called with ISO code of the map and status. |
| - (void) getCountryDetails: | (nonnull SYCountryIso *) | map | |
| installedOnly: | (BOOL) | installed | |
| completion: | (nonnull SYMapInstallerCountryDetailsCompletionBlock) | completion | |
Fetch details about a country asynchronously.
| map | ISO code of the requested country. |
| completion | block is called when the details are ready. Called with SYMapInstallerResult and SYCountryDetails. |
| - (void) getRegionDetails: | (nonnull SYCountryIso *) | map | |
| installedOnly: | (BOOL) | installed | |
| completion: | (nonnull SYMapInstallerRegionDetailsCompletionBlock) | completion | |
Fetch details about a country region asynchronously.
| map | ISO code of the requested region. |
| completion | block is called when the details are ready. Called with SYMapInstallerResult and SYRegionDetails. |
| - (void) setLocale: | (nonnull NSString *) | locale | |
| completion: | (nonnull SYMapInstallerResultCompletionBlock) | completion | |
Sets the locale of MapInstaller's data (the MapLists). Fetches localized MapList from the API and translates local data. Returns SYMapInstallerResultUnsupportedLocale if desired locale is not supported by the maps API. All MapInstaller calls, which return some localized data (getCountryDetails, getRegionDetails, ...), called afterwards, will return localized content (if the locale is supported).
| locale | BCP 47 language tag, containing the desired locale of the content. |
| completion | block is called after setting locale is processed. Called with SYMapLoaderResult. |
| - (void) clearCacheWithCompletion: | (nonnull SYMapInstallerResultCompletionBlock) | completion |
Clear the MapInstaller cache. Clearing the cache will fetch the most recent data (MapList) from the MapsAPI.
| completion | Block that is called when the cache is cleared. |
|
readwritenonatomicweak |
Current SYMapInstallerDelegate.